Log4j 总结(一) log4j特色

One of the distinctive features of log4j is the notion of inheritance in loggers. Using a logger hierarchy it is possible to control which log statements are output at arbitrarily fine granularity but also great ease. This helps reduce the volume of logged output and minimize the cost of logging.

 

log4j一个出彩的特点是引入loggers继承的概念,使用logger继承可以更好控制日志输出的粒度,更加易用。有效的减少了日志输出的数量并且使记录日志减至最小的代价。

 

On an AMD Duron clocked at 800Mhz running JDK 1.3.1, it costs about 5 nanoseconds to determine if a logging statement should be logged or not. Actual logging is also quite fast, ranging from 21 microseconds using the SimpleLayout, 37 microseconds using the TTCCLayout. The performance of the PatternLayout is almost as good as the dedicated layouts, except that it is much more flexible.

 

在AMD主频为800MHz的毒龙处理器运行JDK1.3.1 ,log4j花费约5纳秒来确定是否应该记录日志。实际日志记录也十分迅速,使用SimpleLayout(日志布局)需要21微秒 , 使用TTCCLayout(日志布局)需要37微秒 。PatternLayout(日志布局)的表现非常专业,但它是灵活得多。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值