logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Lehmann <alexl...@gmail.com>
Subject log4j2 how to write a wrapper that passes the class name of my own
Date Sun, 26 Oct 2014 22:32:52 GMT
 I am trying to write a log wrapper for log4j2 for a application server
that uses it's own logger with a wrapper for log4j 1.2, slf4j or JUL.

To be able to log method names and line numbers, the log4j 1.2 wrapper
currently passes the class name of the Logger to the log() method to
make it possible to log the correct method, otherwise only the log
method of the wrapper class is logged.
I am not able to figure out how to do that with log4j2 where the log
methods do not have a parameter for the class name.

(On a side-note, when I use log2j 1.2 and the log4j 1.2-api for log4j
2.x, logging method names works, so I'm probably missing something obvious)

Thanks for your help
bye, Alexander

Alexander Lehmann <alexlehm@gmail.com>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message