The information on this page relates to the Bamboo server (atlassian-bamboo) logs only. You cannot change the logging configuration for the build logs. Bamboo generates two distinct sets of logs:
See Locating Important Directories and Files for information on where to find other important files in Bamboo. |
Configuring 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.
Configuring the Level of Logging on your Bamboo Server
You can adjust the logging levels for the different Bamboo packages on the fly, using the runtime log4j configuration tool in the Bamboo administration console. The default log settings are still stored in the log4j.properties file. When you view the log settings page for the first time you will see the default log settings as defined in log4j.properties. All changes to the log settings via the runtime log4j configuration tool will not be persisted and are valid during bamboo runtime only.
Before you begin:
- Note, you will not need to restart your Bamboo server for any logging changes to take effect.
To change the level of logging on your Bamboo server:
- Click the 'Administration' link in the top navigation bar.
- Click the 'Log Settings' link in the left navigation column under the 'System' section. The 'Bamboo Log Settings' page will display showing the Bamboo packages being logged (see screenshot below).
- To change the logging level of a package that is already being logged, locate the Bamboo package, select the desired logging level from the dropdown next to it and click 'Save'.
- To start the monitoring a package in the Bamboo logs, enter the class name in the text box at the top of the page, select the desired logging level from the dropdown next to it and click 'Add'.
- To stop logging a package, locate the Bamboo package and click the 'Delete' link next to it.
Screenshot above: Bamboo Log Settings
Configuring the Level of Logging on your Bamboo Remote Agents
The runtime log4j configuration tool in the Bamboo administration console can only be used to modify the logging levels for the Bamboo server. To configure the logging levels for your remote agents, you will need to update the log4j.properties
file manually.
You can control the logging for each of remote agents separately from the Bamboo server. To do this, simply repeat the process described below for multiple remote agents, so that each remote agent has a log4j.properties file that overrides the log4j.properties file on the Bamboo server.
To change the level of logging on your remote agent:
- Configure a
log4j.properties
file for your remote agent. This can be anylog4j.properties
file. If you do not already have alog4j.properties
file, you can take a copy of thelog4j.properties
file from the server, copy it to your remote agent and configure it as desired:- The
rootLogger
property in thelog4j.properties
file 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, find the following lines in<Bamboo-Install>/webapp/WEB-INF/classes/log4j.properties
file and update the value oflog4j.rootLogger
to the desired logging level:# # Change the following line to configure the bamboo logging levels (one of INFO, DEBUG, ERROR, FATAL) # log4j.rootLogger=INFO, console, filelog
- Modify the logging level for any of the individual packages in the
log4j.properties
as desired, e.g.log4j.category.webwork=WARN
- The
- Save changes to the file.
- 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 thebamboo-agent.cfg.xml
file. - Restart your remote agent.
Configuring the Location of the atlassian-bamboo Logs
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.
Notes
Related Topics
Configuring System Settings
Locating Important Directories and Files
Viewing a Build's Artifacts