# See for basic example https://stackoverflow.com/questions/125 32339/no-appenders-could-be-found-for-loggerlog4j # For better examples, see /greenstone/greenstone3/web/WEB-INF/classes/log4j.properties ####################### # define some reusable properties macronizer.home=@macronizer.home@ macronizer.logplace=${macronizer.home}/web/logs # Let's log everything from the most basic DEBUG msgs on (so INFO, WARN, ERROR too) log4j.rootCategory=DEBUG, macronlog # copied from GS3 log4j.category.web.servlets.DirectInput=INFO, macronlog log4j.additivity.web.servlets.DirectInput=false # We're saying our log "macronlog" is some file that gets appended to, # and it will write it out to "macron.log" located in whatever we defined the "logplace" to be log4j.appender.macronlog=org.apache.log4j.RollingFileAppender log4j.appender.macronlog.File=${macronizer.logplace}/macron.log # if you have more logs, define rootcategory, appender and appender.File for it as above # for each log also set the format of the output as below, after setting the layout to use PatternLayout class to parse the format log4j.appender.macronlog.layout=org.apache.log4j.PatternLayout log4j.appender.macronlog.layout.ConversionPattern=%-5p: [%d{yyyy-MM-dd HH:mm:ss}] %C{1}.%M()%n %m%n #######################