Skip to content

Instantly share code, notes, and snippets.

@Itaqua
Last active December 31, 2015 04:19
Show Gist options
  • Save Itaqua/7933104 to your computer and use it in GitHub Desktop.
Save Itaqua/7933104 to your computer and use it in GitHub Desktop.
log4j exaple to use with Play1.x production enviroments and asteriskjava
#log to console (mainly for debug)
log4j.rootLogger=ERROR, Console
#Log only to File
#log4j.rootLogger=ERROR, Rolling
log4j.logger.play=INFO
log4j.logger.org.asteriskjava=ERROR
#log4j.logger.org.asteriskjava.manager.internal.ManagerReader=DEBUG
#log4j.logger.org.asteriskjava.manager.internal.ManagerReaderImpl=DEBUG
#log4j.logger.org.asteriskjava.live.internal.QueueManager=DEBUG
# Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p %C ~> %m%n
# Rolling files
log4j.appender.Rolling=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Rolling.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.Rolling.File=${application.path}/logs/application.log
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d{DATE} %-5p ~ %m%n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment