|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwinstone.Logger
public class Logger
A utility class for logging event and status messages. It maintains a collection of streams for different types of messages, but any messages with unknown or unspecified stream go to the default stream.
Field Summary | |
---|---|
protected static int |
currentDebugLevel
|
static int |
DEBUG
|
static java.lang.String |
DEFAULT_STREAM
|
protected static java.io.Writer |
defaultStream
|
static int |
ERROR
|
static int |
FULL_DEBUG
|
static int |
INFO
|
protected static boolean |
initialised
|
static int |
MAX
|
static int |
MIN
|
protected static java.util.Map |
namedStreams
|
protected static java.text.DateFormat |
sdfLog
|
protected static java.lang.Boolean |
semaphore
|
protected static boolean |
showThrowingThread
|
static int |
SPEED
|
static int |
WARNING
|
Constructor Summary | |
---|---|
Logger()
|
Method Summary | |
---|---|
static void |
flush(java.lang.String name)
Forces a flush of the contents to file, display, etc |
static void |
init(int level)
Initialises default streams |
static void |
init(int level,
java.io.OutputStream defaultStream,
boolean showThrowingThreadArg)
Initialises default streams |
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey,
java.lang.String param)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey,
java.lang.String[] params)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey,
java.lang.String[] params,
java.lang.Throwable error)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String streamName,
java.lang.String messageKey,
java.lang.String[] params,
java.lang.Throwable error)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey,
java.lang.String param,
java.lang.Throwable error)
|
static void |
log(int level,
WinstoneResourceBundle resources,
java.lang.String messageKey,
java.lang.Throwable error)
|
static void |
logDirectMessage(int level,
java.lang.String streamName,
java.lang.String message,
java.lang.Throwable error)
|
static void |
setCurrentDebugLevel(int level)
|
static void |
setStream(java.lang.String name,
java.io.OutputStream stream)
Allocates a stream for redirection to a file etc |
static void |
setStream(java.lang.String name,
java.io.Writer stream)
Allocates a stream for redirection to a file etc |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_STREAM
public static int MIN
public static int ERROR
public static int WARNING
public static int INFO
public static int SPEED
public static int DEBUG
public static int FULL_DEBUG
public static int MAX
protected static java.lang.Boolean semaphore
protected static boolean initialised
protected static java.io.Writer defaultStream
protected static java.util.Map namedStreams
protected static int currentDebugLevel
protected static final java.text.DateFormat sdfLog
protected static boolean showThrowingThread
Constructor Detail |
---|
public Logger()
Method Detail |
---|
public static void init(int level)
public static void init(int level, java.io.OutputStream defaultStream, boolean showThrowingThreadArg)
public static void setStream(java.lang.String name, java.io.OutputStream stream)
public static void setStream(java.lang.String name, java.io.Writer stream)
public static void flush(java.lang.String name)
public static void setCurrentDebugLevel(int level)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey, java.lang.Throwable error)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey, java.lang.String param)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey, java.lang.String[] params)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey, java.lang.String param, java.lang.Throwable error)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String messageKey, java.lang.String[] params, java.lang.Throwable error)
public static void log(int level, WinstoneResourceBundle resources, java.lang.String streamName, java.lang.String messageKey, java.lang.String[] params, java.lang.Throwable error)
public static void logDirectMessage(int level, java.lang.String streamName, java.lang.String message, java.lang.Throwable error)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |