Uploaded image for project: 'SR for Confluence - Development'
  1. SR for Confluence - Development
  2. SRCONF-508

Unable to get consistent log output in the Logs tab of the Script Console screen



    • Bug
    • Status: Done
    • High
    • Resolution: Done
    • 5.4.26
    • 5.6.7
    • None
    • SR Squad 118, SR Squad 120, SR Squad 121, SR4C Squad 122, SR4C Squad 123
    • 1
    • 7.3


      Versions tested

      Confluence 6.10.2
      ScriptRunner 5.4.17, 5.4.26


      There is no log output on the Logs tab of the Script Console window.

      Steps to Reproduce

      Run the following script in the Script Console:

      import org.apache.log4j.Logger
      import org.apache.log4j.Level
      def log = Logger.getLogger("Test")
      log.info("test Log")

      Expected Result

      Log output appears in the Logs tab.

      Actual Result

      Unexpected output, or no output appears in the Logs tab.


      During troubleshooting, the first time the above script is run, the following appeared:

      On subsequent runs of the same script, there is no output in the Logs tab:

      Changing line 5 to 'log.setLevel(Level.DEBUG)' then running the script produces the following output on the first run:

      On subsequent runs, there is once again no output.

      Note that there is expected output in the log files themselves:

      Only the Logs tab of the Script Console window is lacking the output.


      A workaround is to specify the log level directly in the log4j.properties file, located in <CONFLUENCE-INSTALL>/confluence/WEB-INF/classes. This results in the correct, actual log output appearing in the Logs tab of the Script Console window as expected.

      Relevant Documentation

      ScriptRunner docs - Advanced Logging
      Atlassian docs - Configuring Logging

      Acceptance criteria

      Our functional tests for the Script Console should also check the log output.


        1. Screen Shot 2018-10-18 at 10.00.26.png
          106 kB
          Tony Gough
        2. Screen Shot 2018-10-18 at 10.04.51.png
          36 kB
          Tony Gough
        3. Screen Shot 2018-10-18 at 10.09.58.png
          91 kB
          Tony Gough
        4. Screen Shot 2018-10-18 at 10.12.23.png
          20 kB
          Tony Gough



            jdavis Jenna Davis
            tgough Tony Gough
            2 Vote for this issue
            13 Start watching this issue