Uploaded image for project: 'JBoss Logging'
  1. JBoss Logging
  2. JBLOGGING-101

Each custom log handler defined in standalone adds a root log4j console appender

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • None
    • jboss-logging-log4j
    • None
    • Hide

      Use mutiple
      <custom-handler
      Then look at:
      Enumeration<?> apps = org.append.log4j.Logger.getRootLogger().getAllAppenders();
      and see the console appenders.

      Show
      Use mutiple <custom-handler Then look at: Enumeration<?> apps = org.append.log4j.Logger.getRootLogger().getAllAppenders(); and see the console appenders.

    Description

      JBoss 7.1.3 Logging custom handlers which are used to wrap existing log4j handlers
      into jboss logging handlers calls
      org.jboss.as.logging.handlers.custom.PropertiesConfigurator
      which calls org.apache.log4j.BasicConfigurator.configure()
      which by default adds a ConsoleAppender. Maybe should be calling
      org.apache.log4j.BasicConfigurator.configure(new NullAppender()); to initialize log4j.
      Net result is all log4j messages get forwarded to jboss logging add also get sent to the default ConsoleAppender which then writes it out stdout which then jboss catches
      as stdout. So we have 3 custom handlers in our jboss configuration so we get 4 messages
      to the screen. (1 for real category and 3 for each console appender added).

      Not sure if this is reported in correct project.

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            jclgml_jira John L (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: