logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Psenner <dpsen...@gmail.com>
Subject Re: Level.All
Date Fri, 25 Nov 2016 09:07:04 GMT
Level.Off = int.MaxValueLevel.Off + 1


On 2016-11-25 00:12, Piers Williams wrote:
>
> All is not something you would log at, it's something to use as a 
> threshold for a logger that should log everything. Because it's lower 
> than all your message logging levels, they all get logged.
>
>
> On 21 Oct 2016 11:25 am, "Nicholas Duane" <nickdu@msn.com 
> <mailto:nickdu@msn.com>> wrote:
>
>     Is Level.All correct?  I looked at it in reflector and it appears
>     to be Level.Off + 1, but since it's a signed int that turns it
>     into a large negative number.  This seems to be causing me some
>     problems. I'm trying to implement something like log4j's
>     EventLogger which I think logs events at level All such that as
>     long as logging is not turned off the events will make it into the
>     logging system.  However, when I log an event at Level.All in
>     log4net it's not getting logged and my guess is because Level.All
>     is negative and thus less than all of the predefined levels.  And
>     since my level threshold is set at INFO my events are getting
>     thrown out.
>
>
>     Is this by design or a bug?
>
>
>     Thanks,
>
>     Nick
>


Mime
View raw message