You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ce...@apache.org on 2005/02/24 17:32:03 UTC
cvs commit: logging-log4j/src/java/org/apache/log4j/helpers LogLog.java
ceki 2005/02/24 08:32:03
Modified: docs HISTORY.txt
src/java/org/apache/log4j/helpers LogLog.java
Log:
- Chatty output about Logger creation or retrieval events is now
suppressed by default. They can be enabled by explicitly setting the
log4j.coreDebug system property.
- The log4j.debug system property no longer has any affect as all
log4j output is done through regular Logger objects. However, in
configuration file in properties format, the log4j.debug property will
cause PropertyConfigurator to *temporarily* output logs generated
during the configuration process. This is very similar to the way the
debug attribute works in configuration files in XML format.
Revision Changes Path
1.27 +15 -0 logging-log4j/docs/HISTORY.txt
Index: HISTORY.txt
===================================================================
RCS file: /home/cvs/logging-log4j/docs/HISTORY.txt,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- HISTORY.txt 20 Jan 2005 17:55:35 -0000 1.26
+++ HISTORY.txt 24 Feb 2005 16:32:03 -0000 1.27
@@ -8,6 +8,21 @@
[D] Changes affect a method or property which was previously marked as
deprecated.
+ ??, 2005
+ - Release of version 1.3alpha-7
+
+ - Chatty output about Logger creation or retrieval events is now
+ suppressed by default. They can be enabled by explicitly setting the
+ log4j.coreDebug system property. [*]
+
+ - The log4j.debug system property no longer has any affect as all
+ log4j output is done through regular Logger objects. However, in
+ configuration file in properties format, the log4j.debug property will
+ cause PropertyConfigurator to *temporarily* output logs generated
+ during the configuration process. This is very similar to the way the
+ debug attribute works in configuration files in XML format. [*]
+
+
January 20th, 2005
- Release of version 1.3alpha-6
1.13 +29 -48 logging-log4j/src/java/org/apache/log4j/helpers/LogLog.java
Index: LogLog.java
===================================================================
RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/helpers/LogLog.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- LogLog.java 17 Nov 2004 17:17:38 -0000 1.12
+++ LogLog.java 24 Feb 2005 16:32:03 -0000 1.13
@@ -17,8 +17,7 @@
package org.apache.log4j.helpers;
-/**
- This class used to output log statements from within the log4j package.
+/**This class used to output log statements from within the log4j package.
<p>Log4j components cannot make log4j logging calls. However, it is
sometimes useful for the user to learn about what log4j is
@@ -31,7 +30,6 @@
the string "log4j: ".
@since 0.8.2
- @deprecated Use {@link org.apache.log4j.Logger} instead.
@author Ceki Gülcü
*/
public class LogLog {
@@ -42,21 +40,17 @@
<p> The value of this string is <b>log4j.debug</b>.
<p>Note that the search for all option names is case sensitive. */
- public static final String DEBUG_KEY = "log4j.debug";
+ public static final String CORE_DEBUG_KEY = "log4j.coreDebug";
protected static boolean debugEnabled = false;
- /**
- In quietMode not even errors generate any output.
- */
- private static boolean quietMode = false;
private static final String PREFIX = "log4j: ";
private static final String ERR_PREFIX = "log4j:ERROR ";
private static final String INFO_PREFIX = "log4j:INFO ";
private static final String WARN_PREFIX = "log4j:WARN ";
static {
- String key = OptionConverter.getSystemProperty(DEBUG_KEY, null);
+ String key = OptionConverter.getSystemProperty(CORE_DEBUG_KEY, null);
if (key != null) {
debugEnabled = OptionConverter.toBoolean(key, true);
@@ -75,15 +69,13 @@
statements. Output goes to <code>System.out</code>.
*/
public static void debug(String msg) {
- if (debugEnabled && !quietMode) {
+ if (debugEnabled) {
System.out.println(PREFIX + msg);
}
}
public static void info(String msg) {
- if ( !quietMode) {
- System.out.println(INFO_PREFIX + msg);
- }
+ System.out.println(INFO_PREFIX + msg);
}
/**
@@ -91,7 +83,7 @@
statements. Output goes to <code>System.out</code>.
*/
public static void debug(String msg, Throwable t) {
- if (debugEnabled && !quietMode) {
+ if (debugEnabled) {
System.out.println(PREFIX + msg);
if (t != null) {
@@ -101,28 +93,20 @@
}
/**
- This method is used to output log4j internal error
- statements. There is no way to disable error statements.
- Output goes to <code>System.err</code>.
+ * This method is used to output log4j internal error statements. There is no
+ * way to disable error statements. Output goes to <code>System.err</code>.
+ * @deprecated Use {@link org.apache.log4j.Logger} instead.
*/
public static void error(String msg) {
- if (quietMode) {
- return;
- }
-
System.err.println(ERR_PREFIX + msg);
}
/**
- This method is used to output log4j internal error
- statements. There is no way to disable error statements.
- Output goes to <code>System.err</code>.
- */
+ * This method is used to output log4j internal error statements. There is no
+ * way to disable error statements. Output goes to <code>System.err</code>.
+ * @deprecated Use {@link org.apache.log4j.Logger} instead.
+ **/
public static void error(String msg, Throwable t) {
- if (quietMode) {
- return;
- }
-
System.err.println(ERR_PREFIX + msg);
if (t != null) {
@@ -131,36 +115,33 @@
}
/**
- In quite mode no LogLog generates strictly no output, not even
- for errors.
-
- @param quietMode A true for not
+ * In quite mode no LogLog generates strictly no output, not even
+ * for errors.
+ * @param quietMode A true for not
+ * @deprecated with no replacement
*/
public static void setQuietMode(boolean quietMode) {
- LogLog.quietMode = quietMode;
+ // nothing to do
}
/**
- This method is used to output log4j internal warning
- statements. There is no way to disable warning statements.
- Output goes to <code>System.err</code>. */
+ * This method is used to output log4j internal warning statements. There is
+ * no way to disable warning statements. Output goes to
+ * <code>System.err</code>.
+ *
+ * @deprecated Use {@link org.apache.log4j.Logger} instead.
+ * */
public static void warn(String msg) {
- if (quietMode) {
- return;
- }
-
System.err.println(WARN_PREFIX + msg);
}
/**
- This method is used to output log4j internal warnings. There is
- no way to disable warning statements. Output goes to
- <code>System.err</code>. */
+ * This method is used to output log4j internal warnings. There is no way to
+ * disable warning statements. Output goes to <code>System.err</code>.
+ *
+ * @deprecated Use {@link org.apache.log4j.Logger} instead.
+ * */
public static void warn(String msg, Throwable t) {
- if (quietMode) {
- return;
- }
-
System.err.println(WARN_PREFIX + msg);
if (t != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org