org.aitools.programd.util
Class JDKLogHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.aitools.programd.util.JDKLogHandler

public class JDKLogHandler
extends java.util.logging.Handler

This handler takes a log message sent to the JDK's logging system and sends it to log4j.

Author:
Noel Bush

Constructor Summary
JDKLogHandler()
           
 
Method Summary
 void close()
           
 void flush()
           
 void publish(java.util.logging.LogRecord record)
           
static void setupInterception()
          Removes any handlers attached to the JDK root logger, and adds an instance of this.
 
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

JDKLogHandler

public JDKLogHandler()
Method Detail

setupInterception

public static void setupInterception()
Removes any handlers attached to the JDK root logger, and adds an instance of this.


publish

public void publish(java.util.logging.LogRecord record)
Specified by:
publish in class java.util.logging.Handler
See Also:
Handler.publish(java.util.logging.LogRecord)

flush

public void flush()
Specified by:
flush in class java.util.logging.Handler

close

public void close()
           throws java.lang.SecurityException
Specified by:
close in class java.util.logging.Handler
Throws:
java.lang.SecurityException