logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <c...@qos.ch>
Subject Re: will there be a parameterized message in log4j like it is in slf4j?
Date Sun, 04 Oct 2009 19:26:04 GMT

You would still be able to pass arbitrary objects but with a different syntax.

   logger.info("{}", someObject);

instead of the current


Jess Holle wrote:
>> Code using using org.apache.log4j.Logger would continue to work as is, 
>> ensuring backward compatibility, at least as far as the log4j 
>> signatures are concerned. Users who rely on the fact that the message 
>> argument was an Object instead of String would need to modify few 
>> lines of code. In the worst case, this change could cause loss of 
>> logging information but would NOT cause compile-time problems or 
>> issues related to method signatures.
> This is a key ability in log4j, which I for one leverage to pass 
> complex, structured data to specialized loggers, e.g. to dissect these 
> structures and place various fields into separate relational database 
> columns.
> Losing first class access to such abilities is a non-starter.
> -- 
> Jess Holle

Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message