Re: [D] Help with migrating from log4j to log4j2 (we also use a slf4j -> log4j) [logging-log4j2]
paladox (via GitHub) <[email protected]>
| Newsgroups | gmane.comp.jakarta.log4j.devel |
|---|---|
| Message-ID | <ghd-D_kwDOAKJSSM4AhuMF-ffa7092f-848b-4960-a081-4c22bbfc8566__36431.0820981459$1757248752$gmane$org@gitbox.apache.org> |
GitHub user paladox added a comment to the discussion: Help with migrating from log4j to log4j2 (we also use a slf4j -> log4j)
I found another alternative:
```
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
ctx.addPropertyChangeListener(
evt -> {
if ("config".equals(evt.getPropertyName())) {
synchronized (lock) {
if (async == null || !async.isStarted()) {
enableLogging();
}
}
}
});
```
GitHub link: https://github.com/apache/logging-log4j2/discussions/3914#discussioncomment-14331488
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]