接口 | 描述 |
---|---|
Filter |
可以使用过滤器对超出记录级别提供的控制范围内的记录进行细粒度控制。
|
LoggingMXBean |
记录设备的管理界面。
|
类 | 描述 |
---|---|
ConsoleHandler |
这
Handler将日志记录发布到
System.err 。
|
ErrorManager |
ErrorManager对象可以附加到处理程序来处理在记录期间在处理程序中发生的任何错误。
|
FileHandler |
简单的文件记录
Handler 。
|
Formatter |
格式化程序提供对LogRecords进行格式化的支持。
|
Handler |
一个
Handler对象从
Logger采用日志消息和出口他们。
|
Level |
Level类定义了一组可用于控制日志输出的标准日志记录级别。
|
Logger |
Logger对象用于记录特定系统或应用程序组件的消息。
|
LoggingPermission |
当SecurityManager运行的代码调用其中一个日志控件方法(如Logger.setLevel)时,SecurityManager将检查该权限。
|
LogManager |
有一个全局LogManager对象用于维护关于日志记录器和日志服务的一组共享状态。
|
LogRecord |
LogRecord对象用于在日志框架和各个日志处理程序之间传递日志请求。
|
MemoryHandler |
Handler缓冲内存中循环缓冲区中的请求。
|
SimpleFormatter |
以人类可读格式打印
LogRecord 的简要摘要。
|
SocketHandler |
简单网络记录
Handler 。
|
StreamHandler |
基于流的日志记录
Handler 。
|
XMLFormatter |
将LogRecord格式化为标准XML格式。
|
Provides the classes and interfaces of the JavaTM 2 platform's core logging facilities. The central goal of the logging APIs is to support maintaining and servicing software at customer sites.
There are four main target uses of the logs:
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.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.