public class LogLog extends Object
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 to
System.err
. All internal messages are prepended with the string "log4j: ".
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_DEBUG_KEY
Deprecated.
Use
DEBUG_KEY instead. |
static String |
DEBUG_KEY
Makes Log4j print log4j-internal debug statements to
System.out . |
protected static boolean |
debugEnabled
Debug enabled Enable or disable.
|
Constructor and Description |
---|
LogLog() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(String message)
Logs Log4j internal debug statements.
|
static void |
debug(String message,
Throwable throwable)
Logs Log4j internal debug statements.
|
static void |
error(String message)
Logs Log4j internal error statements.
|
static void |
error(String message,
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(String message)
Logs Log4j internal warning statements.
|
static void |
warn(String message,
Throwable throwable)
Logs Log4j internal warnings.
|
public static final String DEBUG_KEY
System.out
.
The value of this string is "log4j.debug"
Note that the search for all option names is case sensitive.
@Deprecated public static final String CONFIG_DEBUG_KEY
DEBUG_KEY
instead.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
public static void debug(String message)
message
- the message object to log.public static void debug(String message, Throwable throwable)
message
- the message object to log.throwable
- the Throwable
to log, including its stack trace.public static void error(String message)
message
- the message object to log.public static void error(String message, Throwable throwable)
message
- the message object to log.throwable
- the Throwable
to log, including its stack trace.public static void setInternalDebugging(boolean enabled)
enabled
- Enable or disable.public static void setQuietMode(boolean quietMode)
quietMode
- A true for notpublic static void warn(String message)
message
- the message object to log.Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.