Handler

public abstract class Handler
extends Object

java.lang.Object
   ↳ java.util.logging.Handler


A Handler object takes log messages from a Logger and exports them. It might for example, write them to a console or write them to a file, or send them to a network logging service, or forward them to an OS log, or whatever.

A Handler can be disabled by doing a setLevel(Level.OFF) and can be re-enabled by doing a setLevel with an appropriate level.

Handler classes typically use LogManager properties to set default values for the Handler's Filter, Formatter, and Level. See the specific documentation for each concrete Handler class.

Summary

Protected constructors

Handler()

Default constructor.

Public methods

abstract void close()

Close the Handler and free all associated resources.

abstract void flush()

Flush any buffered output.

String getEncoding()

Return the character encoding for this Handler.

ErrorManager getErrorManager()

Retrieves the ErrorManager for this Handler.

Filter getFilter()

Get the current Filter for this Handler.

Formatter getFormatter()

Return the Formatter for this Handler.

Level getLevel()

Get the log level specifying which messages will be logged by this Handler.

boolean isLoggable(LogRecord record)

Check if this Handler would actually log a