Stash logs clean up or archiving

Does anyone have information on anyone have any information on if there is any log cleanup or backup?

Interested in mainly the atlassian-stash-access.log but info on all or any of them would be appreciated.

Thanks.

2 answers

This widget could not be displayed.

There is no automatic clean-up or backup of the logs, you need to set up a task outside of Stash for this.

This widget could not be displayed.

According to Charles O'Farrell in https://answers.atlassian.com/questions/259156, logs are removed every month.

I think I found this setting in atlassian-stash/WEB-INF/classes/logback.xml.  But it looks like for atlassian-stash-access.log the purging is done every 10 days:

<maxHistory>10</maxHistory>

This should explain the atlassian-stash-access logs on our server going back only 10 days.

Does anyone know if changing this is safe?

Thanks

Hi Derek, That is the logback file with the correct settings. Depends on your definition of "safe" though. The biggest problem you're going to run in to is upgrading Stash. Normally you would just unzip the Stash install and overwrite that file. Now you're going to have to "merge" both copies. Keep in mind that new versions of that file may contain important or relevant changes to the logging depending on what happened that release. If you're adding new appenders my might be interested in this post: https://answers.atlassian.com/questions/188880/how-do-i-control-logging-in-an-atlassian-stash-plugin Other than that though, there's no specific danger in changing the settings - but the advice is always to keep a backup of the file just in case something goes wrong. Charles

Hi Charles, Thanks for the quick and helpful response! I think we will implement a regular backup/archiving of the access logs as we need them for metrics, export control record keeping and possible debugging. But if we change the settings to keep the logs longer, we are already documenting and version controlling certain config files or setup scripts that we update and will do the same with the logback.xml. Thanks, Derek

I'm pulling all the stash logs into splunk for archiving and parsing

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,310 views 8 11
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