log4j.properties
log4j.rootLogger=DEBUG, default,stdout
#log4j.appender.default=org.apache.log4j.FileAppender
log4j.appender.default=org.apache.log4j.DailyRollingFileAppender
log4j.appender.default.file=log/default.log
log4j.appender.default.Threshold=ALL
log4j.appender.default.file.MaxFileSize=1MB
log4j.appender.default.file.MaxBackupIndex=7
log4j.appender.default.ImmediateFlush=true
log4j.appender.default.layout=org.apache.log4j.PatternLayout
log4j.appender.default.layout.ConversionPattern=%d %-5p %C.%M(%L)===>%m %n
log4j.appender.default.append=true
#log4j.logger.app=ALL, app
#log4j.additivity.app=false
#log4j.appender.app=org.apache.log4j.FileAppender
#log4j.appender.app.file=logs/application.log
#log4j.appender.app.Threshold=ALL
#log4j.appender.app.ImmediateFlush=true
#log4j.appender.app.layout=org.apache.log4j.PatternLayout
#log4j.appender.app.layout.ConversionPattern=%d %-5p %C.%M(%L)===>%m%n
#log4j.appender.app.append=false
### log just the SQL
log4j.logger.org.hibernate.SQL=trace
log4j.logger.org.hibernate.engine.query=trace
log4j.logger.org.hibernate.type=trace
### log JDBC bind parameters ###
log4j.logger.org.hibernate.jdbc=trace
#log4j.additivity.org.hibernate.SQL=false
log4j.logger.org.hibernate=info
#log4j.logger.org.hibernate.type=info
### log schema export/update ###
log4j.logger.org.hibernate.tool.hbm2ddl=info
### log cache activity ###
log4j.logger.org.hibernate.cache=info
# Direct log messages to a log file
log4j.logger.app=ALL, app
log4j.additivity.app=false
log4j.appender.app=org.apache.log4j.DailyRollingFileAppender
log4j.appender.app.file=log/application.log
log4j.appender.file.MaxFileSize=1MB
log4j.appender.file.MaxBackupIndex=7
log4j.appender.app.layout=org.apache.log4j.PatternLayout
log4j.appender.app.layout.ConversionPattern=%d{ABSOLUTE} %-5p %C.%M(%L)===>%m%n
log4j.appender.app.append=true
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=ALL
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-5p %C.%M(%L)===>%m%n
#log4j.logger.as.moes=debug
#
#log4j.logger.org.codehaus.groovy=warn
#log4j.logger.org.springframework=warn
#log4j.logger.grails=warn
#log4j.logger.grails.util.GrailsUtil=warn
#log4j.logger.org.hibernate=warn
Thanks for the post, I am techno savvy. I believe you hit the nail right on the head. I am highly impressed with your blog.
ReplyDeleteIt is very nicely explained. Your article adds best knowledge to our Java Online Training from India.
or learn thru Java Online Training from India Students.