Skip to content

Commit

Permalink
Configuracoes do log4j para o projeto
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Jun 21, 2013
1 parent d2c20a7 commit df2542e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions javawebpoc-web/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!
# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.
log4j.rootLogger = debug, stdout, logfile

#------------------------------------------------------------------------------
# The following properties configure the console (stdout) appender.
#------------------------------------------------------------------------------
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %-4r [%t] %-5p %c %x - %m%n

#------------------------------------------------------------------------------
# The following properties configure the Daily Rolling File appender.
#------------------------------------------------------------------------------
log4j.appender.logfile = org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.File = C:\\temp\\log.log
log4j.appender.logfile.Append = true
log4j.appender.logfile.DatePattern = '.'yyy-MM-dd
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n
log4j.appender.logfile.MaxFileSize=2048KB
log4j.appender.logfile.MaxBackupIndex=3

0 comments on commit df2542e

Please sign in to comment.