[logback-dev] RFC: LoggingEvent redesign

Ceki Gulcu ceki at qos.ch
Wed Feb 25 13:08:21 CET 2009


Thorbjoern,

Which data point in logging event are you talking about?

Thorbjoern Ravn Andersen wrote:
> Ceki Gulcu skrev:
>>
>> The prepareForDeferredProcessing() method in the LoggingEvent class
>> addresses that problem. Whenever a logging event is about to be
>> serialized or transferred to another thread, you, as an author of an
>> appender, are supposed to call 
>> loggingEvent.prepareForDeferredProcessing().
> I think that it would be appropriate to provide a flush mechanism on an 
> appender (in lack of a better word) which is accessible through the 
> configuration or pattern or code.
> 
> The flush mechanism would immediately run the String-flattening of the 
> arguments making them safe from all these issues.  If NOT invoked, the 
> flattening would happen as lazily as possible.
> 
> I believe this behaviour should be explicitly enabled, keeping the 
> default of immediately Stringifying when the event has been accepted for 
> logging.
> 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list