GitHub user vy added a comment to the discussion: How do I register a 
StatusListener in configuration?

```
StatusLogger.getLogger().registerListener(...)
```

You need to place this snippet as early as possible in your application 
initialization, e.g.,

```
static {
    StatusLogger.getLogger().registerListener(...)
}

public static void main(String[] args) { ... }
```

GitHub link: 
https://github.com/apache/logging-log4j2/discussions/3576#discussioncomment-12639529

----
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@logging.apache.org

Reply via email to