[slf4j-dev] Structured data "was Plan for SLF4J 2.0"

Joern Huxhorn jhuxhorn at googlemail.com
Tue Mar 9 15:26:53 CET 2010


On 09.03.2010, at 14:29, Ceki Gülcü wrote:

>
> class  MesssageLogger {
>
>  Logger logger;
>
>  void debug(Message msg) {
>    logger.debug("{}", msg);
>  }
>  ...
> }
>
> BTW, I've started looking at both Ralph and Joern's proposals.

Thanks.

The main difference is that the Message is assumed to reach the  
appender implementations unchanged, i.e. not transformed into a String.
That way, appenders can implement special handling of certain known  
(to the appender) Message implementation.
Only an appender like ConsoleAppender would actually use the formatted  
message.
A specifically implemented DBAppender, for example, could store  
certain application-specific fields in special tables.
Or, as in Ralphs case, if I remember correctly: take the structured  
data (a map) and store the various entries as required by the RFC.

Cheers,
Joern.



More information about the slf4j-dev mailing list