2 Replies Latest reply on Jan 5, 2015 2:19 PM by James Perkins

    jboss wildfly  log  confusion

    Gulam Samdani Expert

      I have one confusion:

      several people want to use log4j.properties externally with jboss .

      But why use external log4j.properties over wildfly logging subsystem.

       

      when use log4j externally or when use wildfly logging system .

       

      I want to use following way ..

      Exp :

       

      <subsystem xmlns="urn:jboss:domain:logging:3.0">

           

      ---------------------------------------------------------------------------------------

           import org.jboss.logging.Logger;

       

           private static final Logger log= Logger.getLogger(CustomercrudFacade.class);

       

      Q1.     is wildfly logging subsystem sufficient  for any enterprise application ?

       

      Q2.     is any advantages writing own logging (log4j.properties)  with jboss ?


      Q3.     what is common best practices of logging system for enterprise system ?

        • 1. Re: jboss wildfly  log  confusion
          Jay SenSharma Master

          Q1.     is wildfly logging subsystem sufficient  for any enterprise application ?

             >> Yes,

           

          Q2.     is any advantages writing own logging (log4j.properties)  with jboss ?

              >> Apart from normal logging subsystem entries, Wildfly also provides the "logging-profile" feature.   When the "logging-profile" feature was not introduced that time per application logging based approach (like "log4j.properties" , "log4j.xml" etc) was an option apart for getting control over the application logging.  However "logging-profile" feature is capable of providing more centralized logging and it can be controlled dynamically without redeploying the applications.  Users can assign a logging profile to a deployment via the deployments manifest. The logging profile allows for runtime changes to the configuration. This is an advantage over the per-deployment logging configuration as the redeploy is not required for logging changes to take affect.  See [1]

           

           

           

          [1] Logging Configuration - WildFly 8 - Project Documentation Editor

          • 2. Re: jboss wildfly  log  confusion
            James Perkins Master

            Q1.     is wildfly logging subsystem sufficient  for any enterprise application ?

            I don't see why it wouldn't be.

             

            Q2.     is any advantages writing own logging (log4j.properties)  with jboss ?

            This likely depends on who you ask and what your goal is. Generally speaking I'd say there is no advantage and in some cases it's a disadvantage. Using the WildFly logging subsystem gives you access to runtime changes where as using a log4j.properties requires you redeploy your application.

             

            Q3.     what is common best practices of logging system for enterprise system ?

            Again this probably depends on who you ask. I'd always lean towards using a logging facade like JBoss Logging, slf4j or just plain JUL. Configuring logging is generally dependent on the target runtime.

             

            --

            James R. Perkins