logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Drier" <peter.dr...@gmail.com>
Subject Re: filtering on methods
Date Fri, 13 Jun 2008 19:53:17 GMT
<logger name="Namespace.ClassB" >
   <level value="ERROR" />
</logger>

will filter out any log messages less than ERROR level from ClassB..

So assuming you have something like this already:
        <root>
            <level value="DEBUG" />
            <appender-ref ref="DefaultAppender" />
        </root>

Combined with the above, you'll get Debug and higher from everything except
ClassB.

-Peter

--
Peter's Photography
www.PeterDrier.com

On Fri, Jun 13, 2008 at 3:41 PM, Ross Hinkley <rosshinkley@gmail.com> wrote:

> This might seem like I'm a little log4net-challenged (and that may well
> be), but after spending some time with the message archives and Google, I
> could not figure this one out.  So, I turn to you lot for a hand.
>
> Is there a quick and simple way to filter messages based on the method,
> class, or namespace?
>
> I'm thinking of a situation where you have class A using class B in a has-a
> relationship, where class B is just a helper class.  For debugging purposes,
> having output from class B is well and good, but it generates a surfeit of
> data.  Say I still want to debug class A without having log information for
> class B.  How would I go about doing that?
>
> Thanks in advance,
> Ross
>

Mime
View raw message