[ 
https://issues.apache.org/jira/browse/LOG4J2-3603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607866#comment-17607866
 ] 

Piotr Karwasz commented on LOG4J2-3603:
---------------------------------------

[~rgoers],

Basically I am proposing to use Matt's {{Injector}} to create a component that 
would bind all major logging API together with a backend chosen by the user 
(Log4j2, Logback or JUL).

This {{LoggingSystem}} would abstract operations such as:
* changing a logger's level programmatically,
* reconfigure the backend using a common syntax file,
* ensure that JUL logs to the chosen backend.
* stop the logger context.

At work we don't use Spring Boot, but we provide some functionality to 
administer the logging system. Basically each time we change backend (we 
migrated from Log4j 1 to JUL recently, but I am of course lobbying to switch to 
Log4j2) I have to rewrite these functionalities.

> Provide a lightweight alternative to Spring's LoggingSystem
> -----------------------------------------------------------
>
>                 Key: LOG4J2-3603
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3603
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Piotr Karwasz
>            Priority: Major
>
> While Spring Boot's 
> [AbstractLoggingSystem|https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/logging/AbstractLoggingSystem.html]
>  gives a nice abstraction that allows to configure a logging system (backend 
> + multiple APIs), applications that do not use Spring Boot might profit from 
> a lightweight alternative.
> The DI system of the 3.x series should allow us to detect the logging backend 
> present at runtime, configure the correct JUL redirection handler and provide 
> a uniform configuration format for logger configuration. The format might 
> actually be a subset of the Log4j2 configuration format.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to