Package org.apache.log4j.helpers
Class LogLog
- java.lang.Object
-
- org.apache.log4j.helpers.LogLog
-
public class LogLog extends java.lang.Object
Logs statements from within Log4j.Log4j components cannot make Log4j logging calls. However, it is sometimes useful for the user to learn about what Log4j is doing. You can enable Log4j internal logging by defining the log4j.configDebug variable.
All Log4j internal debug calls go to
System.out
where as internal error messages are sent toSystem.err
. All internal messages are prepended with the string "log4j: ".- Since:
- 0.8.2
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_DEBUG_KEY
Deprecated.UseDEBUG_KEY
instead.static java.lang.String
DEBUG_KEY
Makes Log4j print log4j-internal debug statements toSystem.out
.protected static boolean
debugEnabled
Debug enabled Enable or disable.private static StatusLogger
LOGGER
private static boolean
quietMode
In quietMode not even errors generate any output.
-
Constructor Summary
Constructors Constructor Description LogLog()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
debug(java.lang.String message)
Logs Log4j internal debug statements.static void
debug(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal debug statements.static void
error(java.lang.String message)
Logs Log4j internal error statements.static void
error(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal error statements.static void
setInternalDebugging(boolean enabled)
Enables and disables Log4j internal logging.static void
setQuietMode(boolean quietMode)
In quite mode no LogLog generates strictly no output, not even for errors.static void
warn(java.lang.String message)
Logs Log4j internal warning statements.static void
warn(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal warnings.
-
-
-
Field Detail
-
LOGGER
private static final StatusLogger LOGGER
-
DEBUG_KEY
public static final java.lang.String DEBUG_KEY
Makes Log4j print log4j-internal debug statements toSystem.out
.The value of this string is "log4j.debug"
Note that the search for all option names is case sensitive.
- See Also:
- Constant Field Values
-
CONFIG_DEBUG_KEY
@Deprecated public static final java.lang.String CONFIG_DEBUG_KEY
Deprecated.UseDEBUG_KEY
instead.Makes Log4j components print log4j-internal debug statements toSystem.out
.The value of this string is "log4j.configDebug".
Note that the search for all option names is case sensitive.
- See Also:
- Constant Field Values
-
debugEnabled
protected static boolean debugEnabled
Debug enabled Enable or disable.
-
quietMode
private static boolean quietMode
In quietMode not even errors generate any output.
-
-
Method Detail
-
debug
public static void debug(java.lang.String message)
Logs Log4j internal debug statements.- Parameters:
message
- the message object to log.
-
debug
public static void debug(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal debug statements.- Parameters:
message
- the message object to log.throwable
- theThrowable
to log, including its stack trace.
-
error
public static void error(java.lang.String message)
Logs Log4j internal error statements.- Parameters:
message
- the message object to log.
-
error
public static void error(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal error statements.- Parameters:
message
- the message object to log.throwable
- theThrowable
to log, including its stack trace.
-
setInternalDebugging
public static void setInternalDebugging(boolean enabled)
Enables and disables Log4j internal logging.- Parameters:
enabled
- Enable or disable.
-
setQuietMode
public static void setQuietMode(boolean quietMode)
In quite mode no LogLog generates strictly no output, not even for errors.- Parameters:
quietMode
- A true for not
-
warn
public static void warn(java.lang.String message)
Logs Log4j internal warning statements.- Parameters:
message
- the message object to log.
-
warn
public static void warn(java.lang.String message, java.lang.Throwable throwable)
Logs Log4j internal warnings.- Parameters:
message
- the message object to log.throwable
- theThrowable
to log, including its stack trace.
-
-