看看log4j.jar下面有个ie5的config# For the general syntax of property based configuration files see the
# documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is
# specified, the root category assumes the default priority for root
# which is DEBUG in log4j. The root category is the only category that
# has a default priority. All other categories need not be assigned a
# priority in which case they inherit their priority from the
# hierarchy.log4j.rootCategory=, A1# A1 is set to be a LogMonitorAppender which outputs to a swing
# logging console.
log4j.appender.A1=org.apache.log4j.lf5.LF5Appender读读注释就明白什么意思了,也可以到他们网站上去看看啊!我们是这么配的:
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
# documenation of org.apache.log4j.PropertyConfigurator.# The root category uses the appender called A1. Since no priority is
# specified, the root category assumes the default priority for root
# which is DEBUG in log4j. The root category is the only category that
# has a default priority. All other categories need not be assigned a
# priority in which case they inherit their priority from the
# hierarchy.log4j.rootCategory=, A1# A1 is set to be a LogMonitorAppender which outputs to a swing
# logging console.
log4j.appender.A1=org.apache.log4j.lf5.LF5Appender读读注释就明白什么意思了,也可以到他们网站上去看看啊!我们是这么配的:
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
解决方案 »
- 高分求助!实现将数据保存在XML文件中,但是输出的时候如何选择XML文件放置的目录?
- 为什么ActionForm为空,Struts1.2
- 如何截取字符串????
- hibernate读出null自动变为0的问题
- javamail发送html邮件使用base64编码问题
- tomcat如何自动加载修改过的jar
- 请叫:) :)
- jbuilder8.0没有自带的帮助文档的嘛?
- 请估价开发一个b/s结构的桥牌网站
- 从哪可以获得ejb的知识??
- 在开发ejb中,本地(local)接口、远程(Remote)接口、Home接口、LocalHome接口这些是放在都放在应用服务器中吗,需不需要放在客服端中?
- 继续贴完上回的翻译:EJB Design Patterns
我现在的项目组中自己定义了以下这些级别。
0 – Error 致命エラー、プログラム中断を引き起こす。
1 – Warring 警告、プログラム中断を引き起こさない。
2 – Info 重要な情報。
3 – Info 一般情報。
4 – In/Out 重要な関数入口と出口情報。
5 – In/Out 比較的に重要な関数入口と出口情報。
6 – In/Out 一般関数入口と出口情報。
我现在是想用这些级别替换log4j原有的fatal error warn info debug这几种。
那么,我是不是要重写Logger、Level这些类。或者有什么别的方法?
你可以模仿Level类写一个自己的类,定义自己的级别就可以了!具体的写法见Level类:)