How to redirect scriptrunner log to another file

I am trying to modify so all debugging from scriptrunner addon can be redirected to a separate file , not in atlassian-jira.log.

I have tried this, but no groovy.log is created under log subdirectory of the JIRA HOME directory:


log4j.appender.GroovyLog.layout.ConversionPattern=%d %t %p [%c{4}] %m%n
log4j.appender.GroovyLog.Threshold=DEBUG = DEBUG, console, GroovyLog = false


If instead I replace the first 2 lines for this:


It does create groovy.log under the logs subdirectory of the JIRA INSTALLATION directory.

I need groovy.log to be where all application logs are in the log subdirectory of the JIRA HOME directory.

Thanks in advance,

1 answer

1 accepted

0 votes
Accepted answer

Hi Adolfo,

I understand you are looking to have scriptrunner create its logs in the $JiraHome/log/ folder instead of the default here in the $JiraInstall/logs/ folder.

The way this could be done would be to create a new variable for the Jira home directory.   By default the setup and installation of Jira doesn't always require Jira installations set this variable manually.  Most times it is not set explicitly, but you can follow How do I set my JIRA home? in order to create an operating system variable called JIRA_HOME. 

The 3rd bullet point on that page has these instructions on how to do this.  Depending on whether this is a Windows vs Linux system the steps on how do to this are slightly different.  But either way you can define this to the specific path of your JIRAHOME path and then at that point you can use the $JIRA_HOME/log path in your script as a means to log files there.


Set an environment variable named JIRA_HOME in your operating system whose value is the location of your JIRA home directory. To do this:

  • On Windows, do one of the following:
    • Configure this environment variable through the Windows user interface (typically through 'My Computer' or 'Computer')
    • At the command prompt, enter the following command (with your own JIRA Home path) before running JIRA from the command prompt:
      • set JIRA_HOME=X:\path\to\JIRA\Home
        (warning) Please set your JIRA_HOME  environment variable value using this format, where:
        • X is the drive letter where your JIRA Home Directory is located and
        • no spacing has been added around the equal sign ('=')
    • Specify the command above in a batch file used to start JIRA.
  • On Linux/Solaris, do one of the following:
    • Enter the following command at a shell/console prompt (with your own JIRA Home path) before running JIRA:
      • export JIRA_HOME=/path/to/jira/home
    • Specify the command above in a script used to start JIRA.



I hope this helps.


Hi Andrew,

Finally I got it wot work. Using JIRA_HOME didn't work for me, but this does:


I set JIRA_HOME but log4j didn't translate it to the actual directory. On the other hand I noticed jira.home is set within the jira startup script, so I used that instead and work OK.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

956 views 3 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you