We have some existing code that is used as a library by other projects.
This code uses log4j 1.2. We would like to convert it to use log4j 2.x but
not remove support for 1.2 so that projects that have not yet migrated can
still see logging. Any thoughts on how this might be accomplished?
Thanks.
two possibilities offhand: either continue to use the 1.2 API (which can be
bridged to 2.x), or switch to logging to slf4j (which can be bridged to
about anything).
I'm sure that there are more possibilities.
*■ DOUGLAS E. WEGSCHEID* // Lead Analyst, Directories
(269) 923-5278 // douglas_e_wegsch
You can replace the log4j 1 jar with the log4j 2 compatiblity API. You'll
also need the log4j 2 API and Core modules.
Please see https://logging.apache.org/log4j/2.x/manual/migration.html
Gary
On Wed, Apr 29, 2015 at 12:53 PM, Mike Calmus wrote:
> We have some existing code that is used as a l
Please don't make the library depend on log4j-core. A library should only
depend on log4j-api and leave log configuration to the application using
the library.
And don't log too much from the library, there are too many libraries out
there doing excessive logging.
On Wed, Apr 29, 2015 at 10:54 PM
On Thu, Apr 30, 2015 at 2:13 AM, Mikael Ståldal
wrote:
> Please don't make the library depend on log4j-core. A library should only
> depend on log4j-api and leave log configuration to the application using
> the library.
>
> And don't log too much from the library, there are too many libraries ou