Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-185

Make logging on Tomcat use JDK14LoggerPlugin by default

    XMLWordPrintable

Details

    Description

      I`ve added
      jboss-logging-jdk.jar
      jboss-logging-spi.jar
      mod_cluster.jar
      to Tomcat lib/ directory.

      However, when I start Tomcat, no messages from mod_cluster is displayed.
      By debugging I was able to understand what NullLoggerPlugin is used.

      Where is a code to initialize logging in Tomcat - org.jboss.modcluster.catalina.ModClusterListener.java:65
      however, it is not working because org.jboss.logging.Logger.init() called before it.
      By default, system tries to load log4j plugin, which is not available in this environment.
      After that, it sets NullLoggerPlugin.

      To workaround this, I have added -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.jdk.JDK14LoggerPlugin
      to java options used when Tomcat is started.

      I propose fixing org.jboss.modcluster.catalina.ModClusterListener.java with patch (attaching in next comment).

      Attachments

        Activity

          People

            pferraro@redhat.com Paul Ferraro
            huksley Ruslan Gainutdinov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: