[slf4j-user] Use same message in log and Exception

Kostis Anagnostopoulos ankostis at gmail.com
Mon Jul 5 14:26:53 CEST 2010


On Sun, Jul 4, 2010 at 6:18 AM, Jeff Jensen <jjensen at apache.org> wrote:
> It would be useful if the log messages (e.g. error, debug, etc.) returned
> the String logged message.  The code above creates the message twice.

Having all log-methods return a non-empty message invalidates the
whole purpose of parametrizing messages.
Therefore the returned string would vary depending on the enabled
logging-levels.

And empty-strings would not be of much use as exception messages.


Regards,
  Kostis Anagnostopoulos


More information about the slf4j-user mailing list