Bamboo writes a single log to <BAMBOOINSTALL>/logs/bamboo.log and this can become extremely large for a long-running, busy instance.
I'd like to be able to rotate the log, so that at the end of every day, the log content for that day is spun off into its own date-stamped log.
So instead of:
<BAMBOOINSTALL>/logs/bamboo.log
I could have logs in the format "bamboo.YYYY-MM-DD.log" like:
<BAMBOOINSTALL>/logs/bamboo.2012-03-15.log
<BAMBOOINSTALL>/logs/bamboo.2012-03-16.log
<BAMBOOINSTALL>/logs/bamboo.2012-03-17.log
Modify the log4j.properties file under Bamboo/webapp/WEB-INF/classes folder to use DailyRollingFileAppender.
Hey Jobin,
That appears to be for the <BAMBOOHOME>/logs/atlassian-bamboo.log.x logs.
I'm specifically looking for <BAMBOOINSTALL>/log/bamboo.log. I've got a feeling it's something I need to tweak in wrapper.conf. I'll check the Tanuki Wrapper docs. I need to modify the following section:
#******************************************************************** # Wrapper Logging Properties #******************************************************************** wrapper.console.format=PM wrapper.console.loglevel=INFO wrapper.logfile=../logs/bamboo.log wrapper.logfile.format=LPTM wrapper.logfile.loglevel=INFO wrapper.logfile.maxsize=10m wrapper.logfile.maxfiles=10 wrapper.syslog.loglevel=NONE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IIRC, one of the patched jar files you got will change the log level to DEBUG.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope so! We restarted yesterday, and we've already got a 1.8GB bamboo.log!
Is there anything that can be done to reduce this ahead of upgrading to the next release?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, I think I know which messages you're talking about in your specific case. There will be considerably less stuff logged on your instance with the next release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seems to be controlled by this property that needs to be set in wrapper.conf:
http://wrapper.tanukisoftware.com/doc/english/prop-logfile-rollmode.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cool. Let us know if it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It didn't work.
<BAMBOOINSTALL>/log/bamboo.sh over-rides the log settings in wrapper.conf in the following line:
$RUNNER "nohup sh -c \"cd $BAMBOO_INSTALL && exec $RUN_CMD 2>&1\" >$BAMBOO_LOG_FILE & umask 022 ; echo \$! > $BAMBOO_PID"
, where BAMBOO_LOG_FILE is defined earlier in the shell script as:
BAMBOO_LOG_FILE=${BAMBOO_LOG_FILE:-$BAMBOO_INSTALL/logs/bamboo.log}
I guess I can hack bamboo.sh to include some form of timestamp, but it this will only ensure that a rollover occurs when Bamboo is restarted, and not every day as desired. Bummer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Improvement request created here:
https://jira.atlassian.com/browse/BAM-11246
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.