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

ConfigurationWatchList warning while configured via stream with included files

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 1.2.3
    • logback-core
    • None

    Description

      I have JoranConfigurator configured via stream, something like this: 

      final InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("logback.xml");
      
      try {
       final JoranConfigurator configurator = new JoranConfigurator();
      ..
      configurator.doConfigure(stream);
      ..
      catch {
      //
      }
       
      

      There are configured other includes in his logback definition, something like that:

       

          <include file="${logback.include.file}"/> 
       
      

       

       

      Then, I got this WARNing (ch.qos.logback.core.joran.util.ConfigurationWatchListUtil:65)

       

      WARN in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@2fd66ad3 - Null ConfigurationWatchList. Cannot add file:/<file....>

       

      It is because method GenericConfigurator.doConfigure(InputStream inputStream) does not create ConfigurationWatchList in context (CoreConstants.CONFIGURATION_WATCH_LIST).

      Shouldn't be possible to add included files in ConfigurationWatchList even if there is "no" main configuration file?

       

      Attachments

        Activity

          People

            logback-dev Logback dev list
            milansi Milan Siebenburger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: