Core Objects
The Java 1.4 Logging API consistes of several classes that are responsible for capturing logging information, process and publish the intended logging information to any preferred destination. The following is a list of the core classes that make up the logging API:
LogManager
The java.util.logging.LogManager class is a singleton that is
responsible for managing the logger namespace hierarchy. This class
reads a system-wide configuration file to set the initial properties for the
logging framework. Remember that a singleton is a class that is available
only once per Java Virtual Manager (JVM) instance of an application.
Logger
The java.util.logging.Logger class is responsible for carrying
out the logging activity. This class provides several logging methods to
publish logging information.
LogRecord
The java.util.logging.LogRecord class encapsulates all the
logging information. Typically, it contains header information for the
message like: the date and timestamp of the
logging message, the origin of the logging activity, and the
granularity and priority level of the logging message.
Handler
The java.util.logging.Handler class is responsible for
publishing logging information to various destinations - a file,
console, memory buffers, etc.
Filter
Thejava.util.logging.Filterclass is used byLoggerobjects to decide whether logging information should be passed to aHandlerto deal with it or simply be ignored.Handlerobjects can also useFilterobjects to perform more checks on a logging request before publishing them to the final destination.
Formatter
The java.util.logging.Formatter class is responsible for
providing required structure to the logging information being published.
Formatters also perform the localization of logging information, if
configured to do so.