I have a stand alone application using spring core. I am also using log4j. The structure of the application is a simple shell script, and lib dir with all of my required jar files and a jar of my application.
When I start up my application, the logging for my application, does what I want it to do and uses my log4j properties file. The spring classes however, continue to log to stdout using a totally different pattern.
I know I am missing something easy here but I just can't find it. My log4j configuration is below.
log4j.rootLogger= INFO, A2
log4j.debug=true
# logs to a file
log4j.appender.A2=org.apache.log4j.RollingFileAppe nder
log4j.appender.A2.layout=org.apache.log4j.PatternL ayout
log4j.appender.A2.layout.ConversionPattern=%d{MM/dd/yyyy HH:mm:ss} %-5p [Thread: %t] [Class: %c{2}] [Method: %M] [Line: %L]- "%m"%n
log4j.appender.A2.append.log=false
log4j.appender.A2.File=/home/ppl/logs/PPLdataprocessor.log
log4j.logger.org.springframework=FATAL
Debug output when application starts...
log4j: Parsing for [root] with value=[INFO, A2].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "A2".
log4j: Parsing layout options for "A2".
log4j: Setting property [conversionPattern] to [%d{MM/dd/yyyy HH:mm:ss} %-5p [Thread: %t] [Class: %c{2}] [Method: %M] [Line: %L]- "%m"%n].
log4j: End of parsing for "A2".
log4j: Setting property [file] to [/home/ppl/logs/PPLdataprocessor.log].
log4j: setFile called: /home/ppl/logs/PPLdataprocessor.log, true
log4j: setFile ended
log4j: Parsed "A2" options.
log4j: Parsing for [org.springframework] with value=[FATAL].
log4j: Level token is [FATAL].
log4j: Category org.springframework set to FATAL
log4j: Handling log4j.additivity.org.springframework=[null]
log4j: Finished configuring.
Thanks,
John C


Reply With Quote
