Tag Archives: Log4j selective logging

Using Log4j to selectively log to multiple files

You need to set up more categories in the log4j.properties file, this can be done like so: # The default root appender log4j.rootLogger=A1 # A1 is set to be a ConsoleAppender which outputs to System.out. log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-22d{dd/MMM/yyyy HH:mm:ss} %-8p … Continue reading

Posted in Log4j | Tagged , | 2 Comments