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

ShutdownHook code inconsist with documentation

    XMLWordPrintable

Details

    Description

      In ch.qos.logback.core.joran.action.ShutdownHookAction classname is mandatory

      String className = attributes.getValue(CLASS_ATTRIBUTE);
      if (OptionHelper.isEmpty(className)) {
          addError("Missing class name for shutdown hook. Near [" + name + "] line " + getLineNumber(ic));
          inError = true;
          return;
      }
      

      But on page https://logback.qos.ch/manual/configuration.html

      <configuration debug="true">
         <!-- in the absence of the class attribute, assume 
         ch.qos.logback.core.hook.DelayingShutdownHook -->
         <shutdownHook/>
        .... 
      </configuration>
      

      Attachments

        Activity

          People

            logback-dev Logback dev list
            constantine Constantine
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: