You need to use the line:
log4j.additivity.com.foo.mailagent.MailAgent=false

This means that it does not inherit from its parent (in this case root category).

Cheers,
Scott

>>> [EMAIL PROTECTED] 06/21/01 01:44am >>>
Hi,

We are running Weblogic server 5.1. We have an application log file whichc
 aptures pretty much all the messages. I would like to have a separate logf
 ile for our MailAgent. I added a fileAppender just for that class. For some 
reason LOG4J is logging all the mail messages both into our application loga
 nd mail.log. How do I supress mail messages going into app.log?

We initialize the PropertyConfigurator.configure("props.lcf");
once when the server comes up. If I have 2 lcf files, would I get conflictsw
 hen I load both of them?
----------------------------------------------------------
log4j.rootCategory=debug, R

# R is set to be a RollingFileAppender sending its output to cap.log
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/opt/weblogic/myserver/app.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

# Appender stdout writes stdout
log4j.appender.stdout=org.apache.log4j.FileAppender
log4j.appender.stdout.File=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n


# maillog is set to be a RollingFileAppender sending its output to mail.log
log4j.category.com.foo.mailagent.MailAgent=debug, maillog
log4j.appender.maillog=org.apache.log4j.RollingFileAppender
log4j.appender.maillog.File=/opt/weblogic/myserver/mail.log
log4j.appender.maillog.MaxFileSize=10MB
log4j.appender.maillog.MaxBackupIndex=10
log4j.appender.maillog.layout=org.apache.log4j.PatternLayout
log4j.appender.maillog.layout.ConversionPattern=%d%n%m%n
----------------------------------------------------------

thanks in advance,
- Reddy


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 



-----------------------------------------------------------
This message has been scanned by MailSweeper.
-----------------------------------------------------------



-----------------------------------------------------------
This e-mail is solely for the use of the intended recepient
and may contain information which is confidential or
privileged. Unauthorised use of its contents is prohibited.
If you have received this e-mail in error, please notify 
the sender immediately via e-mail and then delete the 
original e-mail.
-----------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to