comms-logging 输出级别设置

现在的开发人员一般使用Log4j,配置起来非常方便。但若使用Apache的commons-logging则很不方便。

这里只讲commons-logging的级别配置方法:

1、在根目录建立commons-logging.properties文件,输入行

org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

即使用SimpleLog

2、建立simplelog.properties文件,输入行

org.apache.commons.logging.simplelog.defaultlog=debug

即可,后面输出级别可调,默认为info级别


Log4j配置资料很多,不再赘述。Jdk14Logger未找到配置相关资料,但缺省的使用Jdk14Logger.

posted @ 2014-09-26 22:00  hongweigg  阅读(37)  评论(0)    收藏  举报