|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ten60.netkernel.util.SysLogger
Wrapper class around the Logger class. Avoids having to fiddle with the properties file (set all logging allowed and filter message through this class). Also allows check to see if logging allowed before wasting time calling log. Optionally allows logging of Documents and methods. Is a singleton wrapper. Allows use of parameters in logging expressions. Dynamic configuration of logging.
Field Summary | |
static int |
APPLICATION
|
static int |
CACHE
|
static int |
CONTAINER
|
static int |
DEBUG
|
static int |
FINE
|
static int |
INFO
|
static boolean |
logMethods
Controls whether the calling method is written (true) to the log file. |
static char |
NEWLINE_SUBSTITUTE
|
static int |
SEVERE
|
static int |
WARNING
|
Method Summary | |
static void |
addHandler(Handler h)
Add a handler to this logger |
static void |
config(String aBasePath,
XMLReadable config)
|
static int |
getErrorCount()
|
static Handler |
getHandler(String classname)
Get a handler identified by class name |
static int |
getWarningCount()
|
static void |
log(int level,
Object callingObject,
String _msg)
This will always attempt to log. |
static void |
log1(int level,
Object callingObject,
String msg,
Object p1)
Adds a log entry with one parameter. |
static void |
log2(int level,
Object callingObject,
String msg,
Object p1,
Object p2)
Adds a log entry with two parameters. |
static void |
log3(int level,
Object callingObject,
String msg,
Object p1,
Object p2,
Object p3)
Adds a log entry with three parameters. |
static void |
log4(int level,
Object callingObject,
String msg,
Object p1,
Object p2,
Object p3,
Object p4)
Adds a log entry with four parameters. |
static void |
resetHandlers()
Reset and remove Log Handlers |
static void |
resetStats()
|
static void |
setLoggingFor(int level,
boolean on)
Toggle whether to log messages of a certain level. |
static boolean |
shouldLog(int level,
Object callingObject)
Indicates whether a log message of the specified level will be logged. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char NEWLINE_SUBSTITUTE
public static final boolean logMethods
public static final int FINE
public static final int INFO
public static final int WARNING
public static final int SEVERE
public static final int DEBUG
public static final int APPLICATION
public static final int CONTAINER
public static final int CACHE
Method Detail |
public static boolean shouldLog(int level, Object callingObject)
level
- The log level for the message.callingObject
- The object requesting the log message be recorded
public static void addHandler(Handler h)
public static Handler getHandler(String classname)
public static void setLoggingFor(int level, boolean on)
level
- The logging level.on
- If true, log messages for the specified level will be recorded.public static void resetHandlers()
public static void log1(int level, Object callingObject, String msg, Object p1)
level
- The log level for the message.callingObject
- The object requesting the log message be recordedmsg
- The message to record.p1
- The first paramter to add to the messagepublic static void log2(int level, Object callingObject, String msg, Object p1, Object p2)
level
- The log level for the message.callingObject
- The object requesting the log message be recordedmsg
- The message to record.p1
- The first paramter to add to the messagep2
- The second paramter to add to the messagepublic static void log3(int level, Object callingObject, String msg, Object p1, Object p2, Object p3)
level
- The log level for the message.callingObject
- The object requesting the log message be recordedmsg
- The message to record.p1
- The first paramter to add to the messagep2
- The second paramter to add to the messagep3
- The third paramter to add to the messagepublic static void log4(int level, Object callingObject, String msg, Object p1, Object p2, Object p3, Object p4)
level
- The log level for the message.callingObject
- The object requesting the log message be recordedmsg
- The message to record.p1
- The first paramter to add to the messagep2
- The second paramter to add to the messagep3
- The third paramter to add to the messagep4
- The fourth paramter to add to the messagepublic static final void log(int level, Object callingObject, String _msg)
level
- The log level for the message.callingObject
- The object requesting the log message be recordedpublic static void config(String aBasePath, XMLReadable config)
public static void resetStats()
public static int getErrorCount()
public static int getWarningCount()
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |