views:

19

answers:

0

Hello.

Im trying to configure the log4cocoa framework to log as DEBUG level messages to the console and INFO level to some file.I cant figure out how it's done. I have not found any documentation about it, what make things even harder.

This is an example of configuration I`ve tried (not working):

log4cocoa.rootLogger=DEBUG,A1

log4cocoa.appender.A1=L4ConsoleAppender
log4cocoa.appender.A1.layout=L4SimpleLayout
log4cocoa.appender.A1.LogToStandardOut=true

log4cocoa.additivity.name=false
log4cocoa.logger.name=INFO,A2

log4cocoa.appender.A2=L4RollingFileAppender
log4cocoa.appender.A2.File=prox.log
log4cocoa.appender.A2.MaximumFileSize=10MB
log4cocoa.appender.A2.MaxBackupIndex=1
log4cocoa.appender.A2.layout=L4PatternLayout
log4cocoa.appender.A2.layout.ConversionPattern=%-5p : %m%n

Any help is appreciated.Thanks in advance.