log4j.appender.consumer=org.apache.log4j.DailyRollingFileAppender
log4j.appender.consumer.File=${MY_LOG_PATH}/myproject/accertify_component.log
log4j.appender.consumer.DatePattern='.'yyyy-MM-dd
log4j.appender.consumer.layout=org.apache.log4j.PatternLayout
log4j.appender.consumer.layout.ConversionPattern=%5p: %d %C{1}.%M:%L %t %m%n
log4j.appender.requestxmls=org.apache.log4j.DailyRollingFileAppender
log4j.appender.requestxmls.File=${MY_LOG_PATH}/blitz/request_XMLs.log
log4j.appender.requestxmls.DatePattern='.'yyyy-MM-dd
log4j.appender.requestxmls.layout=org.apache.log4j.PatternLayout
log4j.appender.requestxmls.layout.ConversionPattern=%5p: %d %C{1}.%M:%L %t %m%n
log4j.rootLogger=DEBUG, consumer
log4j.category.com.pzt=DEBUG, consumer
log4j.additivity.com.pzt=false
log4j.category.org.springframework=INFO, consumer
log4j.additivity.org.springframework=false
log4j.category.com.pzt.myproject.accertify.core.domain.XMLBuilder=DEBUG, requestxmls
log4j.additivity.com.pzt.myproject.accertify.core.domain.XMLBuilder=false
好吧,我的log4j.properties文件有问题。它记录得很好,但它没有记录我想要的地方。它只看到我的第一个appender并登录accertify_component.log文件。我希望我的XMLBuilder类日志显示在request_XMLs.log文件中。它一直记录在accertify_component.log文件中。感谢所有答案..