2 Replies Latest reply on Apr 19, 2017 4:13 PM by ric_h

    Logging issue with Wildfly 10.1

    ric_h

      I have apps that have their own config and WEB-INF/lib/log4j.jar.  This configuration worked fine since we started using JBoss 4.2.3.  Haven't integrated with Wildfly's logging subsystem yet so I want the apps to be responsible for their respective logging, for now.  I added the following under the logging subsystem:

       

                   <add-logging-api-dependencies value="false"/>

                    <use-deployment-logging-config value="false"/>

       

      What's weird is that, after restarting Wildfly, having these properties set to false makes the logging behave correctly in Windows but not on Linux or Solaris.  On those platforms, I see application logs in the server.log. The apps' contents/configuration and properties when starting the service are the same in all the platforms.  Is there something else to check?

        • 1. Re: Logging issue with Wildfly 10.1
          jamezp

          Connect to the server with CLI to check the settings. The OS should have nothing to do with these settings so it's more likely something just isn't configured correctly.

           

          Here's how you could check the attributes on a standalone server:

          /subsystem=logging:read-attribute(name=add-logging-api-dependencies)
          /subsystem=logging:read-attribute(name=use-deployment-logging-config)
          

           

          If they are set to true you can change them with the follow CLI commands:

          /subsystem=logging:write-attribute(name=add-logging-api-dependencies, value=false)
          /subsystem=logging:write-attribute(name=use-deployment-logging-config, value=false)
          

           

          It's always best to use some kind of management client to make changes rather than editing the raw XML files.

           

          Another option would be to use a jboss-deployment-structure.xml to exclude the logging subsystem. The two attributes above are global so they apply to all deployments. Using the jboss-deployment-structure.xml allows you choose which deployments would be processed by the logging subsystem.

           

          --

          James R. Perkins

          • 2. Re: Logging issue with Wildfly 10.1
            ric_h

            Thanks James.  The reason I put it in standalone.xml is that I do want it applied globally.  When queried, both values are correct based on the settings.

             

            I found conflicting jars were causing the issue.  I have to think the class loading is different and that's why it worked on Windows.