We work with a rather large installation of JIRA, which results in atlassian-jira.log beeing rotated to fast out of date. In our case thats often less than 12 hours.
So I reconfigured logrotate entierly, by disabling all internal logrotation (log4j.properties, <vavle> in server.xml, logging.properties, sentenv.sh).
logrotate ist the done by scripts/cron from linux cli into another sub-dir
Most of it works fine, but I do get the following (I guess while restarting JIRA):
atlassian-jira.log
atlassian-jira.log.1
the second file is the is the one in question. Is there some way to influence the naming/ destination dir for this logfile?
Dear @Frank Lienhard,
you have to adapt the log4j configuration. This article will help you further. For details on the config format, you best got to the apache log4j reference.
So long
Thomas
already done that. The lines responsible fpr the rotation in log4j.properties are commented:
log4j.appender.filelog=com.atlassian.jira.logging.JiraHomeAppender
log4j.appender.filelog.File=atlassian-jira.log
#log4j.appender.filelog.MaxFileSize=20480KB
#log4j.appender.filelog.MaxBackupIndex=5
and it is working basicly. The only annoying part is, that for some reason ONE file ist rotated to "atlassian-jira.log.1".
I tought it was because of a restart of the application, but as I tried to reproduce that, the file wasn't rotated anymore...
EDIT:
Just checked another instance, which is configured the same way. Last "unintended" rotate at 2:51 AM, a time where it was definitly not restarteted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Frank Lienhard,
have you tried the org.apache.log4j.RollingFileAppender?
See also this.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Thomas Deiler,
now you lost me in 2 ways:
do you mean I should use org.apache.log4j.RollingFileAppender instead of something else or to check if that's the cause of the problem.
To the first: No, we strictly want JIRA to not rotate
As for the later: it's not defined in log4j.properties
To the linked article: That question regards to why the logs are beeing written to audit.log.1 instead to audit.log, when the rotate was done delibrately to audit.log.1.
Our problem ist: We don't know what is causing the rotate to audit.log.1 and try to prevent that.
EDIT: I am currently investigating this with the support of atlassian. I'll try to let you know the outcome/ solutioin
...and thanks for all the fish
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.