Team LiB
Previous Section Next Section

ConsoleHandlerjava.util.logging

Java 1.4

This Handler subclass formats LogRecord objects and outputs the resulting string to the System.err output stream. When a ConsoleHandler is created, the various properties inherited from Handler are initialized using system-wide defaults obtained by querying named values with LogManager.getProperty( ). The table below lists these properties, the value passed to getProperty( ), and the default value used if getProperty( ) returns null. See Handler for further details.

Handler property

LogManager property name

Default

level

java.util.logging.ConsoleHandler.level

Level.INFO

filter

java.util.logging.ConsoleHandler.filter

null

formatter

java.util.logging.ConsoleHandler.formatter

SimpleFormatter

encoding

java.util.logging.ConsoleHandler.encoding

platform default


Figure 16-114. java.util.logging.ConsoleHandler


public class ConsoleHandler extends StreamHandler {
// Public Constructors
     public ConsoleHandler( );  
// Public Methods Overriding StreamHandler
     public void close( );  
     public void publish(LogRecord record);  
}

Team LiB
Previous Section Next Section