Source

mosaic project - practice / logging.properties

log4j.rootLogger=info, stdout, R
# Info shows all the errors, from the least important to the most important

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p | %d | Line: %L | Thread: %t | Class: %C: %m%n



log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logs\\log file.log

log4j.appender.R.MaxFileSize=8KB
# Keep one backup file
#log4j.appender.R.MaxBackupIndex=5

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern= %5p | %d | Line: %L | Thread: %t | Class: %C: %m%n



# Initial pattern, by Marc: log4j.appender.R.layout.ConversionPattern=%5p | %t | %d | %m%n