fr.tireme.shared.logging
Class ConsoleOutHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by java.util.logging.StreamHandler
          extended by java.util.logging.ConsoleHandler
              extended by fr.tireme.shared.logging.ConsoleOutHandler

public class ConsoleOutHandler
extends java.util.logging.ConsoleHandler

This Handler publishes log records to System.out. It is the only difference with the standard ConsoleHandler.

Author:
nicolas.guerin@xrce.xerox.com

Constructor Summary
ConsoleOutHandler()
          Create a ConsoleHandler for System.err.
 
Method Summary
 void close()
          Override StreamHandler.close to do a flush but not to close the output stream.
 void publish(java.util.logging.LogRecord record)
          Publish a LogRecord.
 java.lang.String toString()
           
 
Methods inherited from class java.util.logging.StreamHandler
flush, isLoggable, setEncoding
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsoleOutHandler

public ConsoleOutHandler()
Create a ConsoleHandler for System.err.

The ConsoleHandler is configured based on LogManager properties (or their default values).

Method Detail

publish

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

The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.

Overrides:
publish in class java.util.logging.ConsoleHandler
Parameters:
record - description of the log event

close

public void close()
Override StreamHandler.close to do a flush but not to close the output stream. That is, we do not close System.err.

Overrides:
close in class java.util.logging.ConsoleHandler

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object