-
Questions
Context
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, even if the error message fails to mention it, Log4j Core falls back to a default log event factory, if your custom factory is not available (cf. source code). If you want to prevent the message from appearing, you can bundle your custom
Remark: a custom |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the answer @ppkarwasz! A custom |
Beta Was this translation helpful? Give feedback.
@skjelmo,
Yes, even if the error message fails to mention it, Log4j Core falls back to a default log event factory, if your custom factory is not available (cf. source code).
If you want to prevent the message from appearing, you can bundle your custom
LogEventFactory
together with alog4j2.component.properties
containing:Remark: a custom
LogEventFactory
is not necessarily the best tool for the job, since it can not split events. You can split events with a customAppender
implementation or you can limit the size of the stacktrace (each layout has a way to limit stacktraces).