### set log levels ###
#error root logger level to WARN and append to stdout
log4j.rootLogger=info,console,stdout, error
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Root.File=logs
log4j.appender.Root.DatePattern='-'yyyy-MM-dd'.log'
log4j.appender.Root.layout=org.apache.log4j.PatternLayout
log4j.appender.Root.layout.ConversionPattern=[%p] %-d{yyyy-MM-dd HH\:mm\:ss} [%c.%M\:%L]  %m%n

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n

# Print only messages of level ERROR or above in the package noModule.
log4j.logger.noModule=FATAL

# OpenSymphony Stuff
log4j.logger.com.opensymphony=INFO
log4j.logger.com.opensymphony.webwork=DEBUG

# Spring Stuff
log4j.logger.org.springframework=INFO

log4j.additivity.org.apache=true

############################################################
#                       DEBUG                              #
############################################################

log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = ${opencron.home}/logs/opencron.out
log4j.appender.D.Append = true
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss}  [ %t:%r ] - [ %p ]  %m%n

############################################################
#                       ERROR                              #
############################################################
log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
log4j.appender.error.File= ${opencron.home}/logs/error.out
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
log4j.appender.error.DatePattern='-'yyyy-MM-dd'.log'
log4j.appender.error.Threshold=ERROR

############################################################
#                       CONSOLE                            #
############################################################
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=INFO
log4j.appender.console.ImmediateFlush=true
log4j.appender.console.Target=${opencron.home}/logs/opencron.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%-5p] %d(%r) --> [%t] %l: %m %x %n