ConsoleHandler


ConsoleHandler java.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  );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net