I'm surprised that config file works at all.  You are attempting to apply
additivity to your appender.  Additivity applies to loggers, not appenders. 
So, make sure to get rid of the line "log4j.additivity.mail=false".  The rest
looks ok.  I wonder if the line I just mentioned throws the config out of
whack?  I also don't recall if order is significant in the
PropertyConfigurator?  Probably not.  So, anyway, less that line, this should
work unless I'm missing something.

Jake


Quoting Luke Reeves <[EMAIL PROTECTED]>:

> Sure thing:
>
> log4j.rootLogger=INFO, A1, A2
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%d %-5p [%-17c{2}] %3x - %m%n
>
> log4j.appender.A2=org.apache.log4j.FileAppender
> log4j.appender.A2.File=d:\\log4j\\sd.log
> log4j.appender.A2.Append=true
> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> log4j.appender.A2.layout.ConversionPattern=%d %-5p [%-17c{2}] %3x - %m%n
>
> log4j.additivity.mail=false
> log4j.additivity.MailLog=false
> log4j.logger.MailLog=DEBUG,mail
> log4j.appender.mail=org.apache.log4j.FileAppender
> log4j.appender.mail.File=d:\\log4j\\mail.log
> log4j.appender.mail.Append=true
> log4j.appender.mail.layout=org.apache.log4j.PatternLayout
> log4j.appender.mail.layout.ConversionPattern=%d %-5p - %m%n
>
>       Luke
>
> On Tue, Mar 22, 2005 at 03:46:45PM -0600, Jacob Kjome wrote:
> > Post your config file.
> >
> > Jake
> >
> > Quoting Luke Reeves <[EMAIL PROTECTED]>:
> >
> > > I tried that; that makes all log messages (not just mail-related ones)
> > > appear in both files...
> > >
> > >   Luke
> > >
> > > Aswin Asokan wrote:
> > > > Try changing
> > > > log4j.logger.MailLog=mail
> > > > to
> > > > log4j.logger.MailLog=DEBUG,mail
> > > >
> > > >
> > > > Regards,
> > > > Aswin Asokan
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>




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

Reply via email to