[slf4j-user] file/method/class location information

Adam Crain acrain at greenenergycorp.com
Fri Feb 25 15:55:57 CET 2011


Hi,

As far as I understand, SLF4J provides no information to concrete
implementation about location information. How does a binding for, say log4j
for instance no where to look in the stack to get this info?

I would expect to find something like:

Thread.currentThread().getStackTrace()[2].getLineNumber()


Is the place in the callstack configurable? I'm trying to write a Scala
wrapper to SLF4J that uses a Log4j backend, and I'd like to shift the
localization when level up in the callstack.

best,
Adam

-- 

*Adam Crain*

Chief Platform Architect, GEC

Office: 919.836.9916

Cell:  919.428.1002

acrain at greenenergycorp.com <abender at greenenergycorp.com>


*Green Energy Corp,* *enabling the smart grid of the future.**   *

*www.greenenergycorp.com*

*www.totalgrid.org*




-- 

*Adam Crain*

Chief Platform Architect, GEC

Office: 919.836.9916

Cell:  919.428.1002

acrain at greenenergycorp.com <abender at greenenergycorp.com>


*Green Energy Corp,* *enabling the smart grid of the future.**   *

*www.greenenergycorp.com*

*www.totalgrid.org*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20110225/60a51dde/attachment.html>


More information about the slf4j-user mailing list