http://logging.apache.org/log4j/docs/api/org/apache/log4j/varia/LevelRangeFilter.html
BTW, Google is your friend. That was the 2nd link when I searched for "log4j level range" On 4/26/06, Nageena Parveen <[EMAIL PROTECTED]> wrote: > I have no idea how to set the range.Can you help me with this? > > > > On 4/27/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > > > There is a way to set a range of levels. Look through the API. That > > might only be an option when using an XML config file. > > > > On 4/26/06, Nageena Parveen <[EMAIL PROTECTED]> wrote: > > > Hey, > > > After i removed semi colon only ERROR messages are sent to error.logbut > > > still stat.log is getting all the messages equal to and greater than > > > INFO,since i have set the threshold=INFO for S. > > > What can be done to direct only INFO messages to stats.log? > > > > > > On 4/27/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > > > > > > > Then it appears that the threshold isn't set correctly. I use the XML > > > > config format so I am not familiar with the properties format, but I > > > > would double-check how you are setting the threshold. One thing that > > > > does look suspect is the semi-colon on the end of the threshold line. > > > > > > > > On 4/26/06, Nageena Parveen <[EMAIL PROTECTED]> wrote: > > > > > Whatever level i specify at the rootlogger, all those log messages > > are > > > > > logged to both the files. > > > > > say, > > > > > Log4j.rootLogger=INFO,E,S > > > > > > > > > > All the log messages equal to and above are logged to error.log and > > > > stat.log > > > > > > > > > > > > > > > On 4/27/06, James Stauffer <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Does error.log get debug, info, or warn messages? > > > > > > > > > > > > On 4/26/06, Nageena Parveen <[EMAIL PROTECTED]> wrote: > > > > > > > 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] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > 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] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > 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] > > > > > > > > > > > > > > > > > > > > -- > > 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] > > > > > > -- 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]