Console Config:
## LOGGERS ##
#define a logger named helloAppLogger
log4j.rootLogger=INFO,console
## APPENDERS ##
# define an appender named console, which is set to be a ConsoleAppender
log4j.appender.console=org.apache.log4j.ConsoleAppender
## LAYOUTS ##
# assign a SimpleLayout to console appender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%p-%d{yyyy/MM/dd/HH:mm:ss}]%c{1}.%m(%L) - %m%n
DailyRollingFile Config:
log4j.rootCategory=INFO, file
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.File=c://mylog.log
log4j.appender.file.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%p,%d{yyyyMMdd HH/:mm/:ss.SSS},%t,%c,%l,%m%n