[logback-dev] implied Throwables
Glen Marchesani
glen at model3.net
Mon Sep 3 20:42:51 CEST 2007
I love the project and am glad to see the new features added to logging in
general.
I am willing to write a patch for a feature but before I do I want to make
sure it is something you would be interested in.
There is no way to get a stack trace when using paramterized logging. The
patch I want to add is that if the last parameter is a Throwable then it
gets passed to the fitlerAndLog() method as a thorable (instead of throwable
being null).
To explain in code.
log.debug( "Something happened parm1={} parm2={} parm3={}", 1, 2, 3, new
Throwable() );
This would not cause the Throwable to be logged. So here are my questions
- if I added the code to ch.qos.logback.classic.Logger is that something you
are interested in?
- lacking that any recommendations on how to get this feature built in.
Looking forward to your comments and thanks for the great work on a great
logging framework...
regards,
Glen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-dev/attachments/20070903/4b83621a/attachment.htm
More information about the logback-dev
mailing list