BOS Logistics Project 06bos-web module configuration log4jproperties One log4jproperties configuration two log4jproperties source location three log4j tutorial four source download
BOS Logistics Project ——— bos-web module Configuration log4j.properties One, log4j.properties configuration
### Direct log messages to stdout ###
Log4j.appender.stdout=org.apache.log4j.consoleappender
Log4j.appender.stdout.target=system.err
log4j.appender.stdout.layout=org.apache.log4j.patternlayout
Log4j.appender.stdout.layout.conversionpattern=%d{absolute}%5p%c{1}:%l-%m%n
### Direct messages to file MyLog.log ###
log4j.appender.file=org.apache.log4j.fileappender
log4j.appender.file.file=/volumes/ Wiming/log/bos.log
log4j.appender.file.layout=org.apache.log4j.patternlayout
Log4j.appender.file.layout.conversionpattern=%d{absolute}%5p%c{1}:%l-%m%n
### set log levels-for more verbose lo gging Change ' info ' to ' debug ' ###
### fatal error warn info debug trace
log4j.rootlogger=debug, stdout
Here's where the log is logged.
Log4j.appender.file.file=/volumes/wiming/log/bos.log
The following sentence represents the level and output of the log, which is debug level, standard output (console)
Log4j.rootlogger=debug, stdout
Second, log4j.properties source location
Https://github.com/wimingxxx/bos-parent/blob/master/bos-web/src/main/resources/log4j.properties Three, log4j tutorials
log4j Tutorial IV, source download
Https://github.com/wimingxxx/bos-parent