Hi, Thanks for the reply.I want to direct messages to different files depending on level.say, ERROR messages to error.log , INFO messages to stats.log . But I am getting all the messages in all the files. Is there any other way i can do this in a properties file?
On 4/27/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > stdout should get all logs. E should only get ERROR and FATAL logs. > S should get everything from INFO to FATAL. Is that different than > what you see? > > On 4/26/06, Nageena Parveen <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Do you have ant idea how to log messages to different files depending > on > > levels using a single logger? in a properties file? > > > > here is my properties file : > > > > > > log4j.rootLogger=DEBUG,stdout,E,S > > > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > > > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > > > > # Pattern to output the caller's file name and line number. > > > > log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n > > > > #log4j.logger.appender.E.access = ERROR > > > > log4j.appender.E=org.apache.log4j.RollingFileAppender > > > > log4j.appender.E.File=error.log > > > > log4j.appender.E.MaxFileSize=100KB > > > > log4j.appender.E.MaxBackupIndex=1 > > > > log4j.appender.E.layout=org.apache.log4j.PatternLayout > > > > log4j.appender.E.layout.ConversionPattern=%p %t %c - %m%n > > > > log4j.appender.E.Threshold=ERROR; > > > > log4j.appender.S=org.apache.log4j.RollingFileAppender > > > > log4j.appender.S.File=stats.log > > > > log4j.appender.S.MaxFileSize=100KB > > > > # Keep one backup file > > > > log4j.appender.S.MaxBackupIndex=1 > > > > log4j.appender.S.layout=org.apache.log4j.PatternLayout > > > > log4j.appender.S.layout.ConversionPattern=%p %t %c - %m%n > > > > log4j.appender.S.Threshold=INFO; > > > > but this is not working. > > > > > > > -- > James Stauffer > Are you good? Take the test at http://www.livingwaters.com/good/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >