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

Nicolai Parlog commented on LOG4J2-2183:
----------------------------------------

It may make sense to implement this in a separate artifact because, AFAIK, 
there is no way in Java to opt out of specific services. If this were 
implemented in Log4J's core, there could be problems with other logging 
frameworks on the class/module path that offer the same service. This is 
particularly true for SLF4J, which might also implement this.

> Integrate Log4J with Java 9's platform logging API
> --------------------------------------------------
>
>                 Key: LOG4J2-2183
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2183
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Nicolai Parlog
>
> [JEP 264: Platform Logging API and Service|http://openjdk.java.net/jeps/264] 
> introduced an API around [`java.lang.System.Logger` and 
> `java.lang.System.LoggerFinder`|https://docs.oracle.com/javase/9/docs/api/java/lang/System.LoggerFinder.html]
>  that the JDK uses to log internal messages, e.g. those from Swing and JavaFX 
> (this does not extend to JVM logging). Third-party loggers like Log4J can 
> integrate with this via 
> [services|https://docs.oracle.com/javase/9/docs/api/java/util/ServiceLoader.html],
>  so they can become the backend for these messages (instead of JUL).
> Adapting to this API is not very hard - here's a [proof of concept for 
> SLF4J|https://github.com/nicolaiparlog/slf4j/commit/e0c7780bdae254535a6e9c053b2af564085ffe3b].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to