This is a meta-issue tracking subtasks required to introduce a lightweight logging API for use by plugins.
The lightweight logging API offers plugins a stable API upon which to depend. The logging API will facilitate the logging needs of plugins without those plugins depending on any particular third-party library, or server internals. Moreover, any third-party logging library, like say Log4J, will be removed from the class loader hierarchy available to plugins.
The logging API is a small lightweight facade that locates a concrete implementation through an SPI. The logging API is agnostic of any other underlying logging library, like say, Log4J. The implementation however may use Log4J, or another popular logging library. The logging API has no dependency on server, it may however have a dependency on other libs like say, core or x-content (but care must be taken to reduce any dependencies as much as possible).
[ ] MockLogAppender - widely used in our testing. An appender with additional assertion capabilities. THe refactoring can be performed where the log4j appender code is moved into internal implementation and the expectation(asertion) code is within the core/testing package which is part of the exported API.
Bridges
[ ] SLF4J -> ES_Logging API bridge
[ ] Log4j -> ES_Logging API bridge (or we can decide to use the log4j<->sl4j bridge
More:
[ ] Refactor and extrapolate logging configuration in server
Description
This is a meta-issue tracking subtasks required to introduce a lightweight logging API for use by plugins.
The lightweight logging API offers plugins a stable API upon which to depend. The logging API will facilitate the logging needs of plugins without those plugins depending on any particular third-party library, or server internals. Moreover, any third-party logging library, like say Log4J, will be removed from the class loader hierarchy available to plugins.
The logging API is a small lightweight facade that locates a concrete implementation through an SPI. The logging API is agnostic of any other underlying logging library, like say, Log4J. The implementation however may use Log4J, or another popular logging library. The logging API has no dependency on server, it may however have a dependency on other libs like say, core or x-content (but care must be taken to reduce any dependencies as much as possible).
Stable plugin API
ES dedicated logging api
Refactorings
getLogger
calls that do a stack walk. (#84480)ParameterizedMessage
https://github.com/elastic/elasticsearch/issues/86549Testing
internal
implementation and the expectation(asertion) code is within the core/testing package which is part of the exported API.Bridges
More: