François Dumont <francois.cppdevs <at> free.fr> writes:

>   In my company we are using an AsyncAppender for asynchronous logging 
> As you can see the log of the exception has disappeared. This is so with 
> ... Couldn't be 
> LoggingEvent.m_cacheUpdatable simply removed ?
> 

I worked on the same design: asynch logging, fixing threads...
BTW, you should fix properties too, to get proeprties from thread context.

To get exception logged, you need to pass the event through
BufferingForwardingAppender with 
    <bufferSize value="1"/>
    <lossy value ="false"/>
    <fix value="Exception"/>
It will simply restore the exception, becuase, cacheUpdatable flag is set for
the during of the fixing.
That is to say that buffering appenders fix whatever properties, but also make
other prperties un-used; this can be useful in complex scenarios not attempt to
access to proeprty that should not be there (like location, which may be very
long to aquire, and may be misleading... etc).

So, somewhere along the route from logger to layout there 1) either should be no
buffering appenders, or) one of them should Fix the exception peroperty.
Cheers

Reply via email to