在axis2中用log4j
2015-07-15 11:40
309 查看
log4j.properties这个文件在Tomcat 8.0\webapps\axis2\WEB-INF\classes目录下, 不用自己新建, 自动有的.
好用的log4j.properties内容, 我主要改了log4j.appender.LOGFILE.File=logs/axis2.log这句, 原来没有logs/的, 输不出信息来.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE, LOGFILE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE
# Set the enterprise logger priority to FATAL
log4j.logger.org.apache.axis2.enterprise=FATAL
log4j.logger.de.hunsicker.jalopy.io=FATAL
log4j.logger.httpclient.wire.header=FATAL
log4j.logger.org.apache.commons.httpclient=FATAL
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=logs/axis2.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
好用的log4j.properties内容, 我主要改了log4j.appender.LOGFILE.File=logs/axis2.log这句, 原来没有logs/的, 输不出信息来.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE, LOGFILE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE
# Set the enterprise logger priority to FATAL
log4j.logger.org.apache.axis2.enterprise=FATAL
log4j.logger.de.hunsicker.jalopy.io=FATAL
log4j.logger.httpclient.wire.header=FATAL
log4j.logger.org.apache.commons.httpclient=FATAL
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=logs/axis2.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
相关文章推荐
- C++MFC面试题
- 内存泄漏
- android Li 4000 stView ListSelector 不起作用(被覆盖)
- C# Socket简单例子(服务器与客户端通信)
- Webrtc Intro - Compile Steps on Linux Generally
- instruments使用教程
- HTML转为word
- java将html导出成word(利用的poi包导出)
- js中设置元素class的三种方法小结
- iOS7.1企业应用"无法安装应用程序 因为证书无效"的解决方案
- 分布式光伏发电系统的发电量能够实现在线监测吗?
- SVN常见问题
- 关于vim的配置文件
- I帧和IDR帧的区别
- CocoaPods pod instal慢、卡住解决方法
- 访问WEB-INF目录中的JSP文件
- java创建文件和目录
- PHP表单验证
- windows server r2强制使用主题
- Android开发中support_v4包版本不同导致的Unable to instantiate activity ComponentInfo