How to change log4j logging on EC2 agents
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
To debug EC2 agent issues we sometimes need to extra debug classes to its normal log or change the level of logging to some existing classes
Resolution
Perform any needed change in the log4j of the Bamboo server and those changes will be replicated in the EC2 agent
Edit the file
For Bamboo versions prior 9: <Bamboo_Install>/atlassian-bamboo/WEB-INF/classes/log4j.properties adding the needed classes or changing the log level from the existing ones
For Bamboo version 9 and above: <Bamboo_Install>/atlassian-bamboo/WEB-INF/classes/log4j2.properties adding the needed classes or changing the log level from the existing ones
Restart the server
Restart the EC2 agents
⚠️ The EC2 log4j.properties copy can be found at <EC2_Agent_Home>/classpath/bamboo-additional-config.jar
Was this helpful?