Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7077

logging profile with apache commons does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Logging
    • None
    • Hide

      1 - Create an application that uses apache commons to log, for example:

      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;

      public class AppConfig

      { private static final Log logger = LogFactory.getLog(AppConfig.class); …. logger.info(…) }

      2 - create two logging profiles:

      • app1.war
        Logging-Profile: app1-logging
      • app2.war
        Logging-Profile: app2-logging

      Actual results:

      • app1.war writes a log messages with category a.b.c, the ROOT-logger from the logging-profile app1-logging handles the message
      • after that app2.war writes a log message with the same category a.b.c, this message is also handled by the ROOT-logger from the logging-profile app1-logging and not, as expected, by the ROOT-logger from logging-profile app2-logging

      Expected results:

      app1.war writes logs to app1-logging logging profile log file
      app2.war writes logs to app2-logging logging profile log file

      Show
      1 - Create an application that uses apache commons to log, for example: import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class AppConfig { private static final Log logger = LogFactory.getLog(AppConfig.class); …. logger.info(…) } 2 - create two logging profiles: app1.war Logging-Profile: app1-logging app2.war Logging-Profile: app2-logging Actual results: app1.war writes a log messages with category a.b.c, the ROOT-logger from the logging-profile app1-logging handles the message after that app2.war writes a log message with the same category a.b.c, this message is also handled by the ROOT-logger from the logging-profile app1-logging and not, as expected, by the ROOT-logger from logging-profile app2-logging Expected results: app1.war writes logs to app1-logging logging profile log file app2.war writes logs to app2-logging logging profile log file
    • Workaround Exists
    • Hide

      use jboss-logging

      Show
      use jboss-logging

      All entry logs go to the log file of the first accessed application logging profile.

            jperkins-rhn James Perkins
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: