Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-420

NullPointerException in JMX Configurator setLoggerLevel

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.9.12
    • 0.9.11
    • None
    • None

    Description

      import org.slf4j.LoggerFactory;

      import ch.qos.logback.classic.LoggerContext;
      import ch.qos.logback.classic.jmx.Configurator;
      import ch.qos.logback.classic.jmx.ConfiguratorMBean;

      public class Test {
      public static void main(String[] args)

      { LoggerFactory.getLogger("com.test1"); LoggerFactory.getLogger("com.test2"); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); ConfiguratorMBean configurator = new Configurator(lc); configurator.setLoggerLevel("com", "info"); configurator.setLoggerLevel("com", "null"); }

      }

      Exception in thread "main" java.lang.NullPointerException
      at ch.qos.logback.classic.Logger.setLevel(Logger.java:193)
      at ch.qos.logback.classic.jmx.Configurator.setLoggerLevel(Configurator.java:92)
      at Test.main(Test.java:14)

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            optagee Jean-Luc Geering
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: