I would like to cleanup the log files in /opt/atlassian/(jira|confluence)/logs/. I have enabled logrotate, but tomcat is creating dated log files, ie catalina.2017-03-27.log, which defeats logrotate. I have foud where to disabled rotation for the access log in the server.xml file, but I can't find where to do this for catalina.out.
I would like to either disable the tomcat rotation so that logrotate can manage the logs or if it makes more sense, set a limit to how many logs tomcat keeps. Can someone please point me to where this is configured and what options there are specific to rotation or a link to where this is documented? The Configuring Logging section only includes info on enabling/disabling and levels from what I can see. I did not see anything for rotation.
So I ended up doing as errno suggested since even Jira support seems to be unaware of this behavior and just keeps referencing back to their broken documentation. I wrote a script that deletes access.log.* and *.log files with a modified date of more than 30 days. I'll just check after an upgrade to make sure this behavior hasn't changed again.
If it helps anyone, the command that is run is:
find /opt/atlassian/jira/logs/ -maxdepth 1 -name "*.log" -mtime +30 -exec rm {} \;
we just added a cron.weekly entry to clean-up the directory (a simple shell script). works well and has a benefit of being pushed into our code repo...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to avoid writing another script to clean up when there are already tools to do this, but thank you for the suggestion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.