Package winstone
Class Logger
java.lang.Object
winstone.Logger
A utility class for logging event and status messages.
Launcher.initLogger(java.util.Map<java.lang.String, java.lang.String>)
examines the parsed --logfile
option and, if present,
creates a new PrintStream
and sets standard output (stdout) and standard error (stderr)
to that new stream with System.setOut(java.io.PrintStream)
and System.setErr(java.io.PrintStream)
. If this takes place
after JUL has initialized the root logger, the root logger will not be aware of the switch
because its ConsoleHandler
will have already read the old value of System.err
.
For this reason, parsing the --logfile
option and redirecting the standard output
(stdout) and standard error (stderr) streams must take place prior to JUL initialization.
- Version:
- $Id: Logger.java,v 1.8 2006/11/09 06:01:43 rickknowles Exp $
- Author:
- Rick Knowles
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
init
(int level) static void
Initialises default streamsstatic void
Initialize default streamsstatic void
log
(Level level, WinstoneResourceBundle resources, String messageKey) static void
log
(Level level, WinstoneResourceBundle resources, String messageKey, Object param) static void
log
(Level level, WinstoneResourceBundle resources, String messageKey, Object... params) static void
log
(Level level, WinstoneResourceBundle resources, String messageKey, Object[] params, Throwable error) static void
log
(Level level, WinstoneResourceBundle resources, String messageKey, Object param, Throwable error) static void
log
(Level level, WinstoneResourceBundle resources, String streamName, String messageKey, Object[] params, Throwable error) static void
log
(Level level, WinstoneResourceBundle resources, String messageKey, Throwable error) static void
logDirectMessage
(Level level, String streamName, String message, Throwable error) static void
setCurrentDebugLevel
(int level)
-
Constructor Details
-
Logger
public Logger()
-
-
Method Details
-
init
Initialises default streams -
init
public static void init(int level) -
init
Initialize default streams -
setCurrentDebugLevel
public static void setCurrentDebugLevel(int level) -
log
-
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey, Throwable error) -
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey, Object param) -
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey, Object... params) -
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey, Object param, Throwable error) -
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey, Object[] params, Throwable error) -
log
-
logDirectMessage
-