Bamboo generates two distinct sets of logs:

See Locating Important Directories and Files for information on where to find other important files in Bamboo.

The following information relates to the Bamboo server (atlassian-bamboo) logs only. You cannot change the logging configuration for the build logs.

Controlling the Level of Logging

Bamboo uses the log4j library for logging during runtime. The logging levels can be changed by editing the <Bamboo-Install>/webapp/WEB-INF/classes/log4j.properties file. There are five logging levels available: 'DEBUG', 'INFO', 'WARN', 'ERROR' and 'FATAL'. Each logging level provides more logging information that the level before it:
DEBUG < INFO < WARN < ERROR < FATAL
i.e. DEBUG provides the most verbose logging and FATAL provides the least verbose logging.

The rootLogger property controls the verbosity of logs being generated at the top level. By default, the root level logging is set to 'INFO'. To change the root level logging, follow the steps below:

  1. Find the following lines in <Bamboo-Install>/webapp/WEB-INF/classes/log4j.properties file:
    #
    # Change the following line to configure the bamboo logging levels (one of INFO, DEBUG, ERROR, FATAL)
    #
    log4j.rootLogger=INFO, console, filelog
    
  2. Update the value of log4j.rootLogger to the desired logging level.
  3. Save changes to the file.
  4. Restart Bamboo. If you have any elastic agents running, ensure that they are shut down before you restart the Bamboo server. If you do not shut down your elastic instances before restarting, they will continue to run and become orphaned from your Bamboo server.

Configuring logging for your remote agents

You can control the logging for each of remote agents separately from the Bamboo server. To do this for a remote agent, follow the steps below:

  1. Configure a log4j.properties file for your remote agent. This can be any log4j.properties file. If you do not already have a log4j.properties file, you can take a copy of the log4j.properties file from the server, copy it to your remote agent and configure it as desired.
  2. Update the log4j.configuration system property on your remote agent to point to the log4j.properties file. To do this, add the following command line parameter when starting your remote agent:
    -Dlog4j.configuration=/path/to/log4j.file
    where /path/to/log4j.file is the absolute path of your log4j.properties file. You can also update this setting in the bamboo-agent.cfg.xml file.

You can repeat this process for multiple remote agents, so that each remote agent has a log4j.properties file that overrides the log4j.properties file on the Bamboo server.

Configuring the Location of the atlassian-bamboo Logs

By default, the atlassian-bamboo logs can either be found either in the root <Bamboo-Install> directory or the directory you started Bamboo from. In case of a Tomcat webapp deployment, the logs are piped out to catalina.out file.

To change the directory that the atlassian-bamboo logs are generated to, you must set the environment variable for the target location of the logs, as seen below:

log4j.appender.fileLog.file=/my/path/to/atlassian-bamboo.log

Note that the new log file location applies to both the server and remote agents. If using an absolute path this may result in aggregated logs.

See also Locating Important Directories and Files.