GitHub user ppkarwasz added a comment to the discussion: How do I register a
StatusListener in configuration?
We could probably register status listeners automatically using
`ServiceLoader`, which is in practice the only way to ensure that they are
registered **before** `StatusLogger` is used
GitHub user ppkarwasz added a comment to the discussion: Provide a Layout to
StatusLogger
> The error messages are somewhat useful to me as a user, but stack traces from
> inside of log4j are only useful for maintainers of the log4j library.
There are [options for the date format of status
l
GitHub user voddan added a comment to the discussion: Provide a Layout to
StatusLogger
I see. That kinda makes sense, however I wish there was a way to at least turn
of the stack traces. The error messages are somewhat useful to me as a user,
but stack traces from inside of log4j are only use
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(
GitHub user vy added a comment to the discussion: Provide a Layout to
StatusLogger
No, it is not possible and, IMHO, this is a good thing. Status Logger is the
logger for the logger – that is, we need to keep its feature set at minimum.
Consider it like a `printf()` on steroids.
> When I get
GitHub user voddan added a comment to the discussion: How do I register a
StatusListener in configuration?
@vy How would it look in a project? If you can share an example project where
you do it like that, it would be great.
Simply put, I don't understand where I should put this line of code
GitHub user vy edited a comment on the discussion: How do I register a
StatusListener in configuration?
This is explained in [the Status Logger
documentation](https://logging.apache.org/log4j/2.x/manual/status-logger.html#listeners).
You need to programmatically do it. This is also stated in
GitHub user vy added a comment to the discussion: How do I register a
StatusListener in configuration?
This is explained in [the Status Logger
documentation](https://logging.apache.org/log4j/2.x/manual/status-logger.html#listeners).
You need to programmatically do it.
GitHub link:
https://g