[logback-dev] Least-effort logging with bytecode modification

Robert Elliot rob at lidalia.org.uk
Tue Nov 18 21:05:12 CET 2008


On 18 Nov 2008, at 18:43, Ceki Gulcu wrote:
>
>
> However, printing caller information is different than naming  
> loggers after the
> method as Robert described in his email.
>

Indeed - it was to allow fine grained control of trace output that I  
was doing it.  I guess you could use a filter to control which methods  
etc. had trace enabled, but it seemed easier to use the existing name  
hierarchy mechanism.  Though one negative is that "traditionally" the  
last element of the logger name as output by PatternLayout is the  
class name.

>>
>>> 4) passing the stacktrace to the output (depending on how you  
>>> configure the pattern)
>>> so that if you are interested in what it was that changed the  
>>> field or called the
>>> method you don't need trace logging on for the entire application
>
> I think the caller converter mentioned above already does what you  
> want.

Cool, in that case I'll stop mucking about with that.

Rob


More information about the logback-dev mailing list