Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ConsoleHandler

public class ConsoleHandler
extends StreamHandler

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:

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.

Inherited methods

From class java.util.logging.StreamHandler
From class java.util.logging.Handler
From class java.lang.Object

Public constructors

ConsoleHandler

Added in API level 1
ConsoleHandler ()

Constructs a ConsoleHandler object.

Public methods

close

Added in API level 1
void close ()

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

publish

Added in API level 1
void publish (LogRecord record)

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

Parameters
record LogRecord: the log record to be logged.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.