org.restlet.engine.log

## Class TraceHandler

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

    public class TraceHandler
    extends java.util.logging.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

Constructors
Constructor and Description
`TraceHandler()`

### Method Summary

Methods
`void` `close()`
`void` `flush()`
`void` `publish(java.util.logging.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 java.lang.SecurityException

Specified by:
  `close` in class `java.util.logging.Handler`
Throws:
  `java.lang.SecurityException`

#### flush

    public void flush()

Specified by:
  `flush` in class `java.util.logging.Handler`

#### publish

    public void publish(java.util.logging.LogRecord record)

Specified by:
  `publish` in class `java.util.logging.Handler`