Package winstone
Class Logger
- java.lang.Object
-
- winstone.Logger
-
public class Logger extends Object
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 newPrintStream
and sets standard output (stdout) and standard error (stderr) to that new stream withSystem.setOut(java.io.PrintStream)
andSystem.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 itsConsoleHandler
will have already read the old value ofSystem.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
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
init(int level)
static void
init(Level level)
Initialises default streamsstatic void
init(Level level, boolean showThrowingThreadArg)
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)
-
-
-
Method Detail
-
init
public static void init(Level level)
Initialises default streams
-
init
public static void init(int level)
-
init
public static void init(Level level, boolean showThrowingThreadArg)
Initialize default streams
-
setCurrentDebugLevel
public static void setCurrentDebugLevel(int level)
-
log
public static void log(Level level, WinstoneResourceBundle resources, String messageKey)
-
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
public static void log(Level level, WinstoneResourceBundle resources, String streamName, String messageKey, Object[] params, Throwable error)
-
-