public class Log4jLogger extends Logger
Note: using this class implies all the dependencies that the log4j subsystem in use requires (JDK 1.2 or above, in general)
_logLevel, _output1, _output2, LOG_ALL, LOG_ERROR_AND_ABOVE, LOG_INFO_AND_ABOVE, LOG_NOTHING, LOG_WARNING_AND_ABOVE
Modifier and Type | Method and Description |
---|---|
static void |
connectToLog4j()
Static method to call to make JUG use a log4j proxy all of its logging
through a log4j
Logger constructed to correspond with
com.fasterxml.uuid.Logger class (this generally determines
log4j category output etc settings). |
static void |
connectToLog4j(org.apache.log4j.Logger peer)
Static method to call to make JUG use to proxy all of its logging
through the specified log4j
Logger instance. |
protected void |
doLogError(String msg) |
protected void |
doLogInfo(String msg) |
protected void |
doLogWarning(String msg) |
protected void |
doSetOutput(PrintStream str)
Note: this method is meaningless with log4j, since it has more
advanced output mapping and filtering mechanisms.
|
protected void |
doSetOutput(Writer w)
Note: this method is meaningless with log4j, since it has more
advanced output mapping and filtering mechanisms.
|
doSetLogLevel, doWrite, isEnabled, logError, logInfo, logWarning, setLogger, setLogLevel, setOutput, setOutput
public static void connectToLog4j(org.apache.log4j.Logger peer)
Logger
instance.
Method will create a simple wrapper, and call
Logger.setLogger(com.fasterxml.uuid.Logger)
with the wrapper as
the argument. This will then re-direct logging from the previously
defined Logger (which initially is the simple JUG logger) to the
new wrapper, which routes logging messages to the log4j peer Logger
instance.
public static void connectToLog4j()
Logger
constructed to correspond with
com.fasterxml.uuid.Logger
class (this generally determines
log4j category output etc settings).
Method will create a simple wrapper, and call
Logger.setLogger(com.fasterxml.uuid.Logger)
with the wrapper as
the argument. This will then re-direct logging from the previously
defined Logger (which initially is the simple JUG logger) to the
new wrapper, which routes logging messages to the log4j peer Logger
instance.
protected void doSetOutput(PrintStream str)
doSetOutput
in class Logger
protected void doSetOutput(Writer w)
doSetOutput
in class Logger
protected void doLogWarning(String msg)
doLogWarning
in class Logger
protected void doLogError(String msg)
doLogError
in class Logger
Copyright © 2020 FasterXML.com. All rights reserved.