Uploaded image for project: 'JBoss Log Manager'
  1. JBoss Log Manager
  2. LOGMGR-73

Configured logger filters don't work; NPE is hidden

    XMLWordPrintable

Details

    Description

      In org.jboss.logmanager.config.LoggerConfigurationImpl line 83:
      configuration.getHandlerRefs().get(getName()).setFilter((Filter) param.getObject());

      throws a NPE, as configuration.getHandlerRefs() does not contain the relevant entry. The whole thing looks very suspicous because getHandlerRefs() has two entries under 'FILE' and 'CONSOLE' while getName() returns log categories such as 'com.arjuna', so it seems very unlikely that this will ever work.

      The only reason that this appears to work ok is because in org.jboss.logmanager.config.LogContextConfigurationImpl#doApplyPostCreate any exceptions or errors are silently ignored:

      try {
         action.applyPostCreate((T) arg);
      } catch (Throwable ignored) {}
      

      Attachments

        Activity

          People

            dlloyd@redhat.com David Lloyd
            sdouglas1@redhat.com Stuart Douglas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: