Resolving function a logging method is called from

Dear developers, I'm evaluating slf4j for usage with Java Reflections. But when using slf4j in this way, the function where the method (e.g. debug) is called from does not get resolved properly, probably because of the additional abstraction. So now, I'm searching the slf4j source code where the calling function gets resolved, in order to improve my code in turn. Yet I didn't find the relevant part in slf4j where this happens. Could you please give me a hint pointing to the relevant part, or describe the selected solution therefore? Cheers Björn Gerhart

This would be mostly done by actual Logging system and not in Slf4j. For example in Logback this is done in CallerData [1] class. You can use the approach taken there Chetan Mehrotra [1] https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/... On Fri, Feb 14, 2014 at 2:06 PM, Björn Gerhart <oss@airbjorn.de> wrote:
Dear developers,
I'm evaluating slf4j for usage with Java Reflections. But when using slf4j in this way, the function where the method (e.g. debug) is called from does not get resolved properly, probably because of the additional abstraction.
So now, I'm searching the slf4j source code where the calling function gets resolved, in order to improve my code in turn. Yet I didn't find the relevant part in slf4j where this happens. Could you please give me a hint pointing to the relevant part, or describe the selected solution therefore?
Cheers Björn Gerhart _______________________________________________ slf4j-dev mailing list slf4j-dev@qos.ch http://mailman.qos.ch/mailman/listinfo/slf4j-dev
participants (2)
-
Björn Gerhart
-
Chetan Mehrotra