|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.logging.Handler
com.lgc.wsh.util.CleanHandler
public class CleanHandler
An alternative to ConsoleHandler. Uses CleanFormatter and System.out instead of SimpleFormatter and System.err
| Constructor Summary | |
|---|---|
CleanHandler()
Construct a new CleanHandler. |
|
| Method Summary | |
|---|---|
static void |
addGlobalLogFile(java.lang.String fileName)
All CleanHandlers will also log to this file. |
void |
close()
|
void |
flush()
|
static void |
main(java.lang.String[] args)
Test code |
void |
publish(java.util.logging.LogRecord record)
|
static void |
setDefaultHandler()
If the user has not specified a java property for the global Handler, then set the default global handler to this CleanHandler at an INFO level. |
static void |
testLogger()
Call this from your code to test each type of log message |
| Methods inherited from class java.util.logging.Handler |
|---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CleanHandler()
| Method Detail |
|---|
public static void addGlobalLogFile(java.lang.String fileName)
throws java.io.FileNotFoundException
fileName - Name of file to log to.
java.io.FileNotFoundException - if file not foundpublic void publish(java.util.logging.LogRecord record)
publish in class java.util.logging.Handlerpublic void close()
close in class java.util.logging.Handlerpublic void flush()
flush in class java.util.logging.Handlerpublic static void testLogger()
public static void main(java.lang.String[] args)
args - command linepublic static void setDefaultHandler()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||