How to change the location of stdout and stderr logs
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
If JIRA is running as service in Windows, stdout_*.log
and stderr_*.log
files will be created. These files will grow rapidly and over time can become very large. You can change the location of these files to a different location, if needed, using the following methods:
Solution
Method 1
Open the
service.bat
file with editor and find the parameter below:1 2 3
set PR_LOGPATH=%CATALINA_BASE%\logs set PR_STDOUTPUT=auto set PR_STDERROR=auto
Change
set PR_LOGPATH=%CATALINA_BASE%\logs
to any location you wish, for exampleset PR_LOGPATH=D:\logs
Run
service.bat install JIRA_SERVICE_NAME
to install JIRA as a service again.
Method 2
Open the JIRA service configuration as explained at Setting Properties and Options on Startup - via CommandLine.
Modify the location of the
Redirect Stdout
andRedirect Stderr
paths as shown in the screenshot below:ℹ️ Ensure that the user running Jira service has appropriate permissions to the file/directory where you want to redirect the logs to
Apply the changes.
Restart JIRA service for the changes to take effect.
ℹ️ You can also rotate Catalina log file. See How to Rotate Catalina Log File
Was this helpful?