-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
What about idea to implement ECS formatter for JUL (java.util.logging)?
Motivation
there are bunch of old and very old application which use JUL as logging backend. E.g. Tomcat, Tanuki Wrapper and products based on these applications.
Sometimes is it not easy to switch logging framework, sometimes it's not possible to do this at all. But it would be nice to have logs in ECS format and as option (relatively simple?) we may have class EcsFormatter extends java.util.logging.Formatter
.
Open Issues
When I tried to implement it I met a few issues:
- there are no file related metainformation (file name, line etc).
- looks like no thread name, only thread ID
- no MDC or something similar concept
- JUL has bit different log levels and looks like we need mapping between JUL and classical DEBUG/INFO/WARN/ERROR vales. The mapping does not look so pretty, but it is work.
So looks like EcsFormatter class may produce ECS-compatible record, but some of feature will be missed and seems some of AbstractEcsLoggingTest unit tests will be failed.
Questions
- Does it have sense to implement EcsFormatter?
- If yes, how to deal with test cases from AbstractEcsLoggingTest and not supported features like MDC and file meta information?
Metadata
Metadata
Assignees
Labels
No labels