public class CleanHandler
extends java.util.logging.Handler
Constructor and Description |
---|
CleanHandler()
Construct a new CleanHandler.
|
Modifier and Type | Method and Description |
---|---|
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
|
static void |
overrideExistingHandlers(java.util.logging.Level level)
Override any previously specified Handlers with the CleanHandler, and set Level.
|
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
|
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.Handler
public void close()
close
in class java.util.logging.Handler
public void flush()
flush
in class java.util.logging.Handler
public static void testLogger()
public static void main(java.lang.String[] args)
args
- command linepublic static void setDefaultHandler()
public static void overrideExistingHandlers(java.util.logging.Level level)
level
- Logging level for CleanHandler.