There are four main target uses of the logs:
The key elements of this package include:
The Logging APIs offer both static and dynamic configuration control. Static control enables field service staff to set up a particular configuration and then re-launch the application with the new logging settings. Dynamic control allows for updates to the logging configuration within a currently running program. The APIs also allow for logging to be enabled or disabled for different functional areas of the system. For example, a field service engineer might be interested in tracing all AWT events, but might have no interest in socket events or memory management.
In general, unless otherwise noted in the javadoc, methods and constructors will throw NullPointerException if passed a null argument. The one broad exception to this rule is that the logging convenience methods in the Logger class (the config, entering, exiting, fine, finer, finest, log, logp, logrb, severe, throwing, and warning methods) will accept null values for all arguments except for the initial Level argument (if any).
For an overview of control flow, please refer to the Java Logging Overview
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Filter
A Filter can be used to provide fine grain control over what is logged, beyond the control provided by log levels. |
| public interface | LoggingMXBean
Deprecated
since 9. The management interface for the logging facility.
LoggingMXBean is no longer a platform MXBean and is replaced
with java..
|
| Modifier and Type | Class and Description |
|---|---|
| public class | ConsoleHandler
This |
| public class | ErrorManager
ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging. |
| public class | FileHandler
Simple file logging |
| public abstract class | Formatter
A Formatter provides support for formatting LogRecords. |
| public abstract class | Handler
A |
| public class | Level
The Level class defines a set of standard logging levels that can be used to control logging output. |
| public class | Logger
A Logger object is used to log messages for a specific system or application component. |
| pack-priv class | Logging
References Deprecated
Logging is the implementation class of LoggingMXBean.
LoggingMXBean is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public class | LoggingPermission
Deprecated
for removal since 25. This permission cannot be used for controlling access to resources
as the Security Manager is no longer supported.
This class is for logging permissions.
|
| public class | LogManager
There is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services. |
| public class | LogRecord
LogRecord objects are used to pass logging requests between the logging framework and individual log Handlers. |
| public class | MemoryHandler
|
| public class | SimpleFormatter
Print a brief summary of the |
| public class | SocketHandler
Simple network logging |
| public class | StreamHandler
Stream based logging |
| public class | XMLFormatter
Format a LogRecord into a standard XML format. |