关于log4j 2.0
来源:互联网 发布:淘宝男鞋价格和图片 编辑:程序博客网 时间:2024/05/17 01:12
About Log4j 2
Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture.
Some of the features and improvements in Log4j 2 are:
API Separation
The API for Log4j is separate from the implementation. It is now clear to application developers what classes and methods they can use with compatibility being assured while allowing improvements to be made to the implementation.
Improved Performance
Faster performance than Log4j 1.x in critical areas and similar performance to Logback in most circumstances. See Performance for more information.
Support for multiple APIs
While the Log4j 2 API will provide the best performance, support for the SLF4J and Commons Logging APIs are provided.
Automatic Reloading of Configurations
Like Logback, Log4j 2 can automatically reload its configuration upon modification. Unlike Logback, it will do so without losing log events while reconfiguration is taking place.
Advanced Filtering
Like Logback, Log4j 2 supports filtering based on context data, markers, regular expressions and other components in the Log event and can be specified to apply to all events before being passed to Loggers or as they pass through appenders. In addition, filters can also be associated with Loggers. Unlike Logback, a common Filter class can be used in any of these circumstances.
Plugin Architecture
All configurable components are defined as Log4j plugins. As such, no Log4j code must be changed to create a new Appender, Layout, Pattern Converter, etc. Log4j will automatically recognize properly defined plugins and use them when they are referenced in the configuration.
Property Support
Properties can be referenced in the configuration and either be directly replace or passed to the underlying component where they can be dynamically resolved. Properties can come from values defined in the configuration file, system properties, environment variables, the ThreadContext Map, and data present in the event. Users can further customize the property providers by adding their own Lookup Plugin.
Requirements
Log4j 2 requires Java 5 but will take advantage of enhancements in Java 6 to improve performance. Some features may require optional dependencies. These dependencies are specified in the documentation for those features.
News
Log4j 2 is now available for testing. The API for Log4j 2 is not compatible with Log4j 1.x, however an adapter is available to allow applications to continue to use the Log4j 1.x API. Adapters are also available for Commons Logging and SLF4J.
- 关于log4j 2.0
- 关于Log4j 2.0的配置文件
- 关于Log4j
- 关于log4j
- 关于Log4j
- 关于log4j
- 关于log4j
- 关于Log4j
- 关于log4J
- 关于log4j
- 关于Log4j
- 关于log4j
- 关于log4j
- 关于Log4j
- 关于log4j
- 关于log4j的应用
- 【zz】关于Log4j
- 关于log4j异常问题
- 从列表文件读取待处理元素依次处理的脚本
- JavaScript对象与JSON字符串的相互转换
- 使用TelephonyManager获取移动网络信息
- Wuqi.Webdiyer.AspNetPager 比较标准的分页显示格式和属性设置
- 接入点的属性详细介绍
- 关于log4j 2.0
- 确定比赛名次 hdu 拓扑输出字典序最小解
- 优化移动AIR应用程序的性能
- 读写word文档
- 多触点与触屏事件详解(单一监听、事件分发)
- 如何把store里的所有数据转换成JSON传给后台
- js判断时间格式及时间大小
- vc++根据图片定制不规则窗口
- 自己实现RMI(三)对象序列化与反序列化