logger

### direct log messages to stdout ###
log4j.appender.stdout= org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE}   %-5p %-5C %M:%-L %x ->%m%n

### direct messages to file hibernate.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=program.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %-5p %-5C:%L %x -> %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.rootLogger = info, stdout

log4j.logger.org.springframwwork = info

你可能感兴趣的:(apache,log4j,Hibernate)