----- Original Message ----- From: sivamma <[EMAIL PROTECTED]> To: log4j-user@logging.apache.org <log4j-user@logging.apache.org> Sent: Mon Jun 25 09:11:16 2007 Subject: Re: Urgent Please--How to create different log files with different property files in same webapplication
Hi, Thank you for immediate reply. The problem is little different here.XYZ and abc are in same application.XYZ is using abc's jar files and jsps. Our application(abc) have our own log4j configuration property file at WEB-INF folder of XYZ(WEB-INF is common for both of XYZ and abc). We are configuring log4j from java class file.We can not add/modify/delete XYZ's log4j configuration property file.At present we are getting even the XYZ's logs in our log files. Please find our log4j configuration(abc's) log4j.appender.mail.layout=org.apache.log4j.PatternLayout [EMAIL PROTECTED] log4j.appender.mail=org.apache.log4j.net.SMTPAppender log4j.appender.mail.SMTPPassword=xxxxxx log4j.appender.mail.BufferSize=512 log4j.appender.R.layout.ConversionPattern=%d{yyyy MMM dd HH\:mm\:ss} -- %p -- %m%n log4j.appender.mail.evaluatorClass=com.CK.Evaluator log4j.appender.mail.SMTPUsername=siva log4j.appender.R.File=${ck.base}ck_logs.log log4j.rootCategory=debug, R,mail [EMAIL PROTECTED] log4j.appender.R.MaxBackupIndex=10 log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.mail.Threshold=WARN log4j.appender.mail.layout.ConversionPattern=%d{yyyy MMM dd HH\:mm\:ss} -- %p -- %m%n log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.MaxFileSize=100KB log4j.appender.mail.Subject=\=[SMTPAppender] Application message log4j.appender.mail.SMTPHost=mail.abc.com It(abc) works fine as a single application in tomcat6. But when XYZ starts using abc the problem occurs(XYZ is using Weblogic Application server). Is there way to get separate the logs in a same application with different log4j configuration property files. Thanks & Regards, Sivamma James Stauffer wrote: > > If xyz and abc are different web apps then moving log4j.jar and > log4j.xml from common to WEB-INF/lib should keep the logs separate. > If they are in the same web app then they probably have different > logger name roots so you can configure each to use a different > appender. (i.e com.abc uses one appender and com.xyz uses another > appender). > > On 6/25/07, sivamma <[EMAIL PROTECTED]> wrote: >> >> Hi, >> I have a requirement to create different log files in same >> application.Our >> application will be used in a different web application.Even the other >> application is using log4j.We have our own log4j configuration >> property(WEB-INF/config.properties) file and separate log file in a >> particular directory(WEB-INF/logs/xxx.log). >> >> At present the problem is we are getting logs from other application to >> our >> log file. >> Our application(Giving as jar files) is under other application. >> >> For example our application is abc and others is xyz. >> >> The directory structure is "webapps/xyz/WEB-INF" where it contains xyz's >> log4j property file as well abc's log4j property file.abc's logs are >> supposed to go "webappas/xyz/WEB-INF/logs/abc.log" and xyz's logs are >> supposed to go different file(Which we dont know , exactly where it >> goes). >> But at present xyz's logs are coming into abc's logs means , they are >> coming >> into "webapps/xyz/WEB-INF/logs/abc.log" >> >> Can you please tell me how can get logs only from my applicaiton(may not >> be >> from my application..only from my classes). >> >> Its little urgent. >> Thanks in advacne. >> Regards, >> Sivamma. >> -- >> View this message in context: >> http://www.nabble.com/Urgent-Please--How-to-create-different-log-files-with-different-property-files-in-same-webapplication-tf3974952.html#a11283346 >> 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 Stauffer http://www.geocities.com/stauffer_james/ > 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] > > > -- View this message in context: http://www.nabble.com/Urgent-Please--How-to-create-different-log-files-with-different-property-files-in-same-webapplication-tf3974952.html#a11286397 Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]