You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/24 09:28:00 UTC

[jira] [Closed] (OFBIZ-13722) java.util.logging output bypasses Log4j 2: log4j-jul is on the classpath but never activated

     [ https://issues.apache.org/jira/browse/OFBIZ-13722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13722.
---------------------------------
    Fix Version/s: Upcoming Branch
                   24.09.09
       Resolution: Fixed

> java.util.logging output bypasses Log4j 2: log4j-jul is on the classpath but never activated
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13722
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13722
>             Project: OFBiz
>          Issue Type: Bug
>          Components: start
>    Affects Versions: Upcoming Branch, 24.09.08
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Minor
>             Fix For: Upcoming Branch, 24.09.09
>
>
> h3. Problem
> {{dependencies.gradle}} adds {{log4j-jul}} "for external jars using the java.util.logging", but nothing sets {{java.util.logging.manager}}, so it never takes effect. Libraries that log through java.util.logging (Tomcat, Jersey, and Geronimo transaction manager 4.x) print to stdout in the JDK's own format, never reach {{ofbiz.log}}, and ignore the levels in {{log4j2.xml}}: for example Tomcat's INFO "Initializing ProtocolHandler" lines show although {{org.apache}} is set to warn.
> h3. Fix
> At the start of {{Start.main}}, set {{java.util.logging.manager}} to {{org.apache.logging.log4j.jul.LogManager}} unless it is already set, before anything uses java.util.logging. Checked locally: there are no java.util.logging lines left on stdout, and Tomcat messages go to {{ofbiz.log}} filtered by {{log4j2.xml}}.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)