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

Jure Skelin commented on LOG4J2-2648:
-------------------------------------

As {{java.util.logging.LogManager}} is initialized when web application 
container gets started. And once initialized, that class never gets initialized 
again.  That means setting on an application level (like war which is running 
inside app server) is to lata. Right?
So, to use log4j-jul {{LogManager}, it is needed to set it on an application 
server/conteiner level.
And that solution is not acceptable.

There is something similar in Apache CXF ({{org.apache.cxf.common.logging}} 
package). But they are using log4j ver1 (not log4j2)


> Public Log4j Core implementation of the JUL Logger class.
> ---------------------------------------------------------
>
>                 Key: LOG4J2-2648
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2648
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: JUL adapter
>            Reporter: Jure Skelin
>            Priority: Major
>
> In Glassfish I would like to do something like this:
> {code}
> public class MyApplication extends ResourceConfig {
>     private static final Logger log = 
> LogManager.getLogger(MyApplication.class);
>     public MigrationApplication() {
>         register(new LoggingFeature(new CoreLogger(log)));
>     }
> }
> {code}
> {{java.util.logging.Logger}} is already implemented by the 
> {{org.apache.logging.log4j.jul.CoreLogger}},
> +but the constructor is package private+.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to