Hi,

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(),
logEvent.getFQNOfLoggerClass());

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.

Wei

Reply via email to