Configure Stash Logging

'How Do I...' and 'How to...' Guide to Stash

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

It is sometimes useful for Stash administrators to change the number of days logs are kept or the size of those individual log files. These sorts of modifications can be accomplished by editing the logback.xml located in <Stash Installation>/atlassian-stash/WEB-INF/classes/logback.xml. These changes will need to be applied manually when Stash is upgraded.

Stash holds on to atlassian-stash.log for 31 days by default, but this can be changed by editing the max_history variable in this block of code:

<appender name="stash.application" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

atlassian-stash-access.log files are kept for 10 days, but this can be modified in the same way from this section of code:

<appender name="stash.accesslog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">


You can edit the individual file sizes using the maxFileSize variable for both types of logs. Make sure to restart Stash after changes have been made to ensure they take effect. 

Last modified on Feb 23, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.