dubbo中log4j检查(开发环境中建议设置为false)

一、在pom.xml里面引入依赖

dubbo中log4j检查(开发环境中建议设置为false)_第1张图片

1. 添加log4j文件

dubbo中log4j检查(开发环境中建议设置为false)_第2张图片

2. 文件内容

# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE            debug   info   warn error fatal
log4j.rootCategory=debug, CONSOLE, LOGFILE, info
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
# 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=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=d:\axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n


3.运行结果(系统默认为自动检查)

dubbo中log4j检查(开发环境中建议设置为false)_第3张图片

二、设置自动检查为false,设置后就不会出现上图

在消费者里面设置
dubbo中log4j检查(开发环境中建议设置为false)_第4张图片

注意每次修改完,使用tomcat7的时候要再安装install

dubbo中log4j检查(开发环境中建议设置为false)_第5张图片

你可能感兴趣的:(dubbo)