日志组件commons-logging和log4j(四)
来源:互联网 发布:线性规划的单纯形算法 编辑:程序博客网 时间:2024/06/05 09:26
获取日志对象:
直接用log4j的时候,代码这样编写(这里的LogListener只是你的ClassName,完全是可以变换的)
public static Logger log (这里的log也可以改成其他的,相当于一个变量)
= LogManager.getLogger(LogListener.class);
或者
public static Logger log = LogManager.getLogger("javastudy.LogListener");
LogManager 也可以换成Logger(换个单词就行,其他的都不要变)
用到commons-logging的时候,代码也可以·这样编写
private static Log logger = LogFactory.getLog(LogListener.class);
0 0
- 日志组件commons-logging和log4j(四)
- log4j 和commons-logging 两个日志组件
- 日志组件log4j和commons-logging(一)
- 日志组件commons-logging和log4j(二)
- 日志组件commons-logging和log4j(三)
- Java日志组件 commons-logging和log4j介绍
- Java日志组件 commons-logging和log4j介绍
- 日志组件 commons-logging、slf4j、log4j
- commons-logging和Log4j 日志管理
- commons-logging和Log4j 日志管理
- commons-logging和Log4j 日志管理
- 使用commons-logging和log4j记录日志
- commons-logging和Log4j 日志管理
- commons-logging和Log4j日志管理
- 日志工具jdklogging,log4j和commons-logging
- commons-logging和Log4j 日志管理
- 使用commons-logging和log4j记录日志
- 使用commons-logging和log4j记录日志
- ExecutorService 的理解与使用
- ISO 11898协议更新说明
- 注意!!!
- java transient简介
- so包找不到
- 日志组件commons-logging和log4j(四)
- 盒模型
- java(二)
- h5打包成ios的app
- Redis win7版 设置访问密码
- Android程序员应该知道的一切
- 数据库数据的增加
- Hello World!
- Node+Express+MongoDB实现登录注册功能