You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Nicko Cadell <ni...@neoworks.com> on 2004/04/21 21:41:47 UTC
RE: log4 net post: RE: configure different logfiles for different
namespaces
Marco,
> Now i want to disable logging to the <root>
> when an alternative logger is found.
> Is that possible?
If you mean that you have some appenders defined in the <root> and some in a
<logger> and you don't want the <root> appenders to be used as well as the
<logger> appenders then you need to set the Appender Additivity of the
logger. See the following link for a definition of Additivity:
http://logging.apache.org/log4net/release/manual/introduction.html#HC-718930
8
To disable additivity on a <logger> set the additivity="false" attribute on
it. For details see:
http://logging.apache.org/log4net/release/manual/configuration.html#HC-13756
354
Cheers,
Nicko
> -----Original Message-----
> From: Marco Dissel [mailto:mdissel@home.nl]
> Sent: 21 April 2004 19:35
> To: Nicko Cadell
> Subject: Re: log4 net post: RE: configure different logfiles
> for different namespaces
>
> Thanks.. <logger> did the trick..Now i want to disable
> logging to the <root> when an alternative logger is found. Is
> that possible?
>
> (using log4net 1.2.0beta8)
>
> Regards
>
> Marco
>
> ----- Original Message -----
> From: Nicko Cadell <ma...@neoworks.com>
> To: 'Marco Dissel' <ma...@home.nl>
> Sent: Tuesday, April 20, 2004 11:34 PM
> Subject: RE: log4 net post: RE: configure different
> logfiles for different namespaces
>
> Marco,
>
> Which version of log4net you are using?
> Can you email your logging configuration file. (by the
> look of it your con
> it's your Web.config file).
>
> If possible please reproduce your issue with the
> internal log4net debugging
> enabled. Include this debug output in your post.
>
> http://logging.apache.org/log4net/release/manual/faq.html#inte
> rnalDebug
> If you run your web app in the Visual Studio debugger
> the log4net internal
> debug will be written to the Debug Output window.
>
> Thanks,
>
> Nicko
>
> > -----Original Message-----
> > From: Marco Dissel [mailto:mdissel@home.nl]
> > Sent: 20 April 2004 21:45
> > To: nicko@neoworks.com
> > Subject: log4 net post: RE: configure different logfiles for
> > different namespaces
> >
> > Sorry for my direct post, but i'm subscribed to the digest
> > list and have no idea how to reply to an individual message..
> >
> > I already tried your suggestion, but that doesn't seem to
> > work.. It's an asp.net. I've configured all my assemblies
> > with [assembly: log4net.Config.XmlConfigurator(Watch=true)]
> >
> > The log object is initialized like this:
> > private static readonly ILog log =
> LogManager.GetLogger(typeof(Bar));
> >
> > Is this the correct setup?
> >
> > Thanks
> >
> > Marco
> >
> >
> >
> >
>
>