logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Onion Crucian <onioncruc...@gmail.com>
Subject migration from log4j 1.2 to log4j2: locationInformation and getAppender() are missing
Date Fri, 23 Jan 2015 19:17:13 GMT

I am doing POC to migrate current project from using log4j1 to log4j2.
There are custom appenders in our projects and we are using a lot of log4j
internal APIs. There are a few things I couldn't find the new way to
achieve. I appreciate if anyone can help.

1 LocationInfomation.

we used to get locationinformation like this in case of no exception thrown
from caller:

locationInfo = new LocationInfo(new Throwable(),

I couldn't find the log4j2 implenentation to do the similar thing.
2 how to getAppender from logger? we have a lot of code to get the appender
in the project: logger.getAppender(appenderName). I read the api for the
log4j2, I couldn't find any.

Thank you all for your time.


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