org.restlet.engine.log
Class TraceHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.restlet.engine.log.TraceHandler

public class TraceHandler
extends Handler

Special handler that logs in the console all log message sent through the log manager. For each log record, it displays the source logger name and the actual message. This is particularly useful for debugging.

Author:
Jerome Louvel

Constructor Summary
TraceHandler()
           
 
Method Summary
 void close()
           
 void flush()
           
 void publish(LogRecord record)
           
static void register()
          Registers the handler with the root logger.
 
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

TraceHandler

public TraceHandler()
Method Detail

register

public static void register()
Registers the handler with the root logger. Removes any default handler like the default console handler.


close

public void close()
           throws SecurityException
Specified by:
close in class Handler
Throws:
SecurityException

flush

public void flush()
Specified by:
flush in class Handler

publish

public void publish(LogRecord record)
Specified by:
publish in class Handler


Copyright © 2005-2011 Noelios Technologies.