Is it possible to exclude names from logger?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to exclude names from logger?

Francis1
Hi,

Consider these loggers:
<logger name="Prices" level="Trace" writeTo="prices" />
<logger name="*" level="Trace" writeTo="debug">

Goal:
I want "Prices" in one target and everything else in another target.

Problem:
The prices (when level="Trace") are logged to both targets (prices and
debug).

Is there a way to specify name="* except Prices" ?  I'd like to avoid
specifying all my classes in separate loggers.

Thanks,

Francis


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to exclude names from logger?

Jarek Kowalski
Administrator
Francis Gingras wrote:
> Hi,
>
> Consider these loggers:
> <logger name="Prices" level="Trace" writeTo="prices" />
> <logger name="*" level="Trace" writeTo="debug">
>
> Goal:
> I want "Prices" in one target and everything else in another target.
>  
Just add final="true" to the first rule.

--
Jarek Kowalski
http://blog.jkowalski.net
http://www.nlog-project.org/ - A .NET Logging Library



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list
NLog Blog
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to exclude names from logger?

Francis1
It works thanks!

Those loggers are amazingly flexible.

Francis

-----Original Message-----
From: Jaroslaw Kowalski [mailto:[hidden email]]
Sent: Wednesday, August 16, 2006 23:30
To: Francis Gingras
Cc: [hidden email]
Subject: Re: [Nlog-list] Is it possible to exclude names from logger?

Francis Gingras wrote:
> Hi,
>
> Consider these loggers:
> <logger name="Prices" level="Trace" writeTo="prices" /> <logger
> name="*" level="Trace" writeTo="debug">
>
> Goal:
> I want "Prices" in one target and everything else in another target.
>  
Just add final="true" to the first rule.

--
Jarek Kowalski
http://blog.jkowalski.net
http://www.nlog-project.org/ - A .NET Logging Library





-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list