Hey James , Thanks for you reply now i find another way that , i have three classes Job , Address , User. Now i want to put All messages of Job class into separate file and all Address messages to another file and same as in User. So if i set priority level in Job class like warn so all fatal , error and warn messages of Job class goes to one file and no any other class messages so how can i do it with Properties file??
Can you give me one sample code example so i can understand more clearly.. Appreciate ur help Jimmy Mehta James A. N. Stauffer wrote: > > I find that I want one file for each level and higher. i.e. Warn.log has > warn, error, and fatal messages. That can easily be done by setting > thresholds on each appender. If you want only a certain level then you > can > use a level match filter but that requires XML config. > > On 10/31/07, Jimmy Mehta <[EMAIL PROTECTED]> wrote: >> >> >> Hi, >> >> I am new to the LOG4J and i am trying to learn so i have a question that >> if >> i need to put different priority log messages to different log files. >> Suppose i want to put all warn messages to one file and all info messages >> to >> another file and all error messages to another file. My root priority is >> Info and I also set different packages to different priority level. >> >> Suppose com.tc.portal.xyz = info so how should i put different priority >> messages to different file >> >> Main thing , i want to make only change in log4j.properties file , i >> don't >> want to change java files >> >> Jimmy >> -- >> View this message in context: >> http://www.nabble.com/LOG4J---Different-priority-messages-to-different-files-tf4728211.html#a13519537 >> Sent from the Log4j - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > James A. N. Stauffer http://www.geocities.com/stauffer_james/ > Are you good? Take the test at http://www.livingwaters.com/good/ > > -- View this message in context: http://www.nabble.com/LOG4J---Different-priority-messages-to-different-files-tf4728211.html#a13535224 Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
