public class JavaUtilLogger extends Logger
Note: using this class requires JDK 1.4 or above.
_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 |
connectToJavaUtilLogging()
Static method to call to make JUG use a log4j proxy all of its logging
through a j.u.l
Logger constructed to correspond with
com.fasterxml.uuid.Logger class (this generally determines
j.u.l category output etc settings). |
static void |
connectToJavaUtilLogging(Logger peer)
Static method to call to make JUG use to proxy all of its logging
through the specified j.u.l
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 connectToJavaUtilLogging(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 connectToJavaUtilLogging()
Logger
constructed to correspond with
com.fasterxml.uuid.Logger
class (this generally determines
j.u.l 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 j.u.l 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 © 2018 FasterXML.com. All rights reserved.