How to change log4j logging on EC2 agents
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
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
ソリューション
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