Fields Summary |
---|
public static final String | DEBUG_KEYDefining this value makes log4j print log4j-internal debug
statements to System.out .
The value of this string is log4j.debug.
Note that the search for all option names is case sensitive. |
public static final String | CONFIG_DEBUG_KEYDefining this value makes log4j components print log4j-internal
debug statements to System.out .
The value of this string is log4j.configDebug.
Note that the search for all option names is case sensitive. |
protected static boolean | debugEnabled |
private static boolean | quietModeIn quietMode not even errors generate any output. |
private static final String | PREFIX |
private static final String | ERR_PREFIX |
private static final String | WARN_PREFIX |
Methods Summary |
---|
public static void | debug(java.lang.String msg)This method is used to output log4j internal debug
statements. Output goes to System.out .
if(debugEnabled && !quietMode) {
System.out.println(PREFIX+msg);
}
|
public static void | debug(java.lang.String msg, java.lang.Throwable t)This method is used to output log4j internal debug
statements. Output goes to System.out .
if(debugEnabled && !quietMode) {
System.out.println(PREFIX+msg);
if(t != null)
t.printStackTrace(System.out);
}
|
public static void | error(java.lang.String msg)This method is used to output log4j internal error
statements. There is no way to disable error statements.
Output goes to System.err .
if(quietMode)
return;
System.err.println(ERR_PREFIX+msg);
|
public static void | error(java.lang.String msg, java.lang.Throwable t)This method is used to output log4j internal error
statements. There is no way to disable error statements.
Output goes to System.err .
if(quietMode)
return;
System.err.println(ERR_PREFIX+msg);
if(t != null) {
t.printStackTrace();
}
|
public static void | setInternalDebugging(boolean enabled)Allows to enable/disable log4j internal logging.
String key = OptionConverter.getSystemProperty(DEBUG_KEY, null);
if(key == null) {
key = OptionConverter.getSystemProperty(CONFIG_DEBUG_KEY, null);
}
if(key != null) {
debugEnabled = OptionConverter.toBoolean(key, true);
}
debugEnabled = enabled;
|
public static void | setQuietMode(boolean quietMode)In quite mode no LogLog generates strictly no output, not even
for errors.
LogLog.quietMode = quietMode;
|
public static void | warn(java.lang.String msg)This method is used to output log4j internal warning
statements. There is no way to disable warning statements.
Output goes to System.err .
if(quietMode)
return;
System.err.println(WARN_PREFIX+msg);
|
public static void | warn(java.lang.String msg, java.lang.Throwable t)This method is used to output log4j internal warnings. There is
no way to disable warning statements. Output goes to
System.err .
if(quietMode)
return;
System.err.println(WARN_PREFIX+msg);
if(t != null) {
t.printStackTrace();
}
|