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

hudson.ExtensionList logs stacktrace unnecessarily on FINE level

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 2.150.3
      JVM Version 1.8.0_181-b02
      Apache Tomcat 8.5.38
      Tomcat started with all logging bridged to log4j2 via -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
      Tomcat enables DEBUG (FINE) logging for everything

      Goal: More operational insight into Jenkins

       

      Starting up a newly-downloaded Jenkins 2.150.3 with the FINE level enabled currently logs this misleading stacktrace about 20 times:

      23:15:27.375 [pool-7-thread-9] DEBUG hudson.ExtensionList - Loading ExtensionList: class hudson.ExtensionFinder23:15:27.375 [pool-7-thread-9] DEBUG hudson.ExtensionList - Loading ExtensionList: class hudson.ExtensionFinder
      java.lang.Throwable: null
          at hudson.ExtensionList.load(ExtensionList.java:378) ~[?:?]
          at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318) ~[?:?]
          at hudson.ExtensionList.getComponents(ExtensionList.java:183) ~[?:?]
          at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1114) ~[?:?] 
          at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83) ~[?:?] 
          at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102) ~[?:?] 
          at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109) ~[?:?] 
          at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102) ~[?:?] 
          at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177) ~[?:?] 
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) ~[?:?] 
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_181] 
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_181] 
          at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

      In looking at the code, a new Throwable is created when this message is logged. If we left that out, we'd get the nice DEBUG message without the concerning stacktrace.

            Unassigned Unassigned
            sghill Steve Hill
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: