Android
java.util.logging
public class

java.util.logging.ConsoleHandler

java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
java.util.logging.ConsoleHandler

A handler that writes log messages to the standard output stream System.err.

This handler reads the following properties from the log manager to initialize itself:

  • java.util.logging.ConsoleHandler.level specifies the logging level, defaults to Level.INFO if this property is not found or has an invalid value;
  • java.util.logging.ConsoleHandler.filter specifies the name of the filter class to be associated with this handler, defaults to null if this property is not found or has an invalid value;
  • java.util.logging.ConsoleHandler.formatter specifies the name of the formatter class to be associated with this handler, defaults to java.util.logging.SimpleFormatter if this property is not found or has an invalid value;
  • java.util.logging.ConsoleHandler.encoding specifies the encoding this handler will use to encode log messages, defaults to null if this property is not found or has an invalid value.

This class is not thread-safe.

Summary

Public Constructors

            ConsoleHandler()
Constructs a ConsoleHandler object.

Public Methods

          void  close()
Closes this handler.
          void  publish(LogRecord record)
Logs a record if necessary.
Methods inherited from class java.util.logging.StreamHandler
Methods inherited from class java.util.logging.Handler
Methods inherited from class java.lang.Object

Details

Public Constructors

public ConsoleHandler()

Constructs a ConsoleHandler object.

Public Methods

public void close()

Closes this handler. The System.err is flushed but not closed.

public void publish(LogRecord record)

Logs a record if necessary. A flush operation will be done.

Parameters

record the log record to be logged
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48