I have a log4j logger that currently writes the log both to console and to a file, which works fine.
Later I'd like to configure it to log INFO + ERROR to the logfile, but only show ERROR on console. What would I have to change to achieve this?
log4j.rootLogger=INFO, console, MyFileAppender
log4j.logger.org.apache.cxf=INFO, console
log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=INFO, console
log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.MyFileAppender=org.apache.log4j.RollingFileAppender
log4j.appender.MyFileAppender.Append=true
log4j.appender.MyFileAppender.File=c:/logs.log
Further, I'd like to prevent the CXF XML requests to be logged in the file. But I want them still to be shown in the console. How?