Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69496

Reducing log level can hide log messages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      Steps to reproduce

      1. Find code that conditionally logs at one of two different levels, based on Logger#isLoggable: For example:

      if (LOGGER.isLoggable(Level.FINEST)){
        LOGGER.finest(…);
      } else {
        LOGGER.fine(…);
      }

      2. Create a log recorder at http://localhost:8080/jenkins/manage/log/ that logs messages for the logger above at FINEST and Save.

      3. Edit the previously created log recorder to log at FINE only.

      4. Do whatever is needed to log something from step 1.

      Expected result

      See the FINE message

      Actual result

      See no message, since the logger is still set to FINEST, just not for this log recorder (the global levels view at http://localhost:8080/jenkins/manage/log/levels shows this).

      Since http://localhost:8080/jenkins/manage/log/all ignores everything more verbose than INFO, these FINEST messages cannot be seen anywhere.

      Workaround

      On http://localhost:8080/jenkins/manage/log/levels also reduce the log level for the logger.

            Unassigned Unassigned
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: