This is the documentation for Bamboo 5.7. View this page for the

Unknown macro: {spacejump}

of Bamboo, or visit the latest Bamboo documentation.

Bamboo では次の 2 種類のログ セットが生成されます。

  • Build logs
    The build logs are generated each time a plan is executed. All information specific to the build is stored in these logs, which can be downloaded as an artifact (see Viewing a build's artifacts). You cannot change the logging configuration for the build logs.

    The build logs are located in the <Bamboo-Home>/xml-data/builds/ sub-directories.

  • Bamboo Server のログ
    • atlassian-bamboo logs for the Bamboo server  — Bamboo records all server activity in the atlassian-bamboo.log. The location of the atlassian-bamboo.log file can be viewed in Bamboo's System Information under the 'Bamboo Paths' section. 

      In case of a Tomcat webapp deployment, the logs are piped out to catalina.out file.

    • atlassian-bamboo logs for elastic agents — Elastic agent activity is logged inside the elastic instance where the elastic agent runs. To access the elastic agent logs (atlassian-bamboo.log and bamboo-elastic-agent.out) use ssh to log in to your elastic instance as described in Viewing an elastic instance and retrieve the logs.
    • atlassian-bamboo logs for remote agents — All agent activity is recorded in atlassian-bamboo-agent.log file stored on the agent machine. These are generated in the running directory of the agent. The running directory can be viewed in the remote agent's system properties under the 'Bamboo Paths' section.

 

See Locating important directories and files for information on where to find other important files in Bamboo.

 

Bamboo Server のログ レベルを設定する

Bamboo uses the log4j library for logging during runtime. The logging levels can be changed by editing the <Bamboo-Install>/atlassian-bamboo/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 after it:
DEBUG > INFO > WARN > ERROR > FATAL
i.e. DEBUG provides the most verbose logging and FATAL provides the least verbose logging.

Bamboo 管理コンソールのランタイム log4j 設定ツールを使用すると、さまざまな Bamboo パッケージのログ レベルをその場で調整できます。既定のログ設定は log4j.properties ファイルに維持されます。ログ設定ページを初めて表示すると、log4j.properties で定義されている既定のログ設定が表示されます。ランタイム log4j 設定ツールによるログ設定の変更はいずれも永続化されず、Bamboo ランタイムでのみ有効です。

始める前に

  • ロギングの変更を有効にするのに Bamboo Server を再起動する必要はありません。

Bamboo Server のログ レベルを変更する

  1. Click the  icon in the Bamboo header and choose Overview.
  2. 左側のナビゲーション パネルの [Log Settings (ログ設定)] ([System (システム)] の下) をクリックします。[Bamboo Log Settings (Bamboo ログ設定)] ページが表示され、ロギングの対象となっている Bamboo パッケージが示されます (下のスクリーンショットを参照)。
    • 既にロギングされているパッケージのログ レベルを変更するには、Bamboo パッケージを探し、その横にあるリストから目的のログ レベルを選択し、[Save (保存)] をクリックします。
    • Bamboo ログでのパッケージの監視を開始するには、ページ上部のテキスト ボックスにクラス名を入力し、その横にあるリストから目的のログ レベルを選択し、[Add (追加)] をクリックします。
    • パッケージのロギングを停止するには、Bamboo パッケージを探し、その横にある [Delete (削除) ] をクリックします。

スクリーンショット: Bamboo ログ設定


リモート エージェントのログ レベルを設定する

Bamboo 管理コンソールのランタイム log4j 設定ツールは、Bamboo Server のログ レベルの変更にのみ使用できます。リモート エージェントのログ レベルを設定するには、log4j.properties ファイルを手動で更新する必要があります。

各リモート エージェントのロギングは、Bamboo Server とは別に制御できます。そのためには、複数のリモート エージェントに対して下記のプロセスを繰り返し、各リモート エージェントの log4j.propertiesファイルによって Bamboo Server 上の log4j.propertiesファイルをオーバーライドするだけです。

リモート エージェントのログ レベルを変更する

  1. 対象のリモート エージェント用に log4j.properties ファイルを設定します。任意の log4j.properties ファイルを使用できます。log4j.properties ファイルがまだない場合は、サーバーから log4j.properties ファイルのコピーを取得し、それをリモート エージェントにコピーして希望どおりに設定できます。
    • log4j.properties ファイル内の rootLogger プロパティは、ルート レベルで生成されるログの詳細度を制御するためのものです。既定では、ルート レベルのロギングは「INFO」に設定されています。ルート レベルのロギングを変更するには、<Bamboo-Install>/webapp/WEB-INF/classes/log4j.properties ファイル内の次の行を探し、log4j.rootLogger の値を目的のログ レベルに更新します。

      #
      # Change the following line to configure the bamboo logging levels (one of INFO, DEBUG, ERROR, FATAL)
      #
      log4j.rootLogger=INFO, console, filelog
      
    • 必要に応じて、次のように、log4j.properties で個々のパッケージのログ レベルを変更します。log4j.category.webwork=WARN
  2. ファイルの変更を保存します。
  3. リモート エージェントの log4j.configuration システム プロパティを更新して、log4j.properties ファイルを指すようにします。そのためには、<bamboo-agent-home>/conf/wrapper.conf ファイルに次の行を追加します。
    wrapper.java.additional.3=-Dlog4j.configuration=/full/path/to/log4j.properties
    ここで、/full/path/to/log4j.properties は、log4j.properties ファイルの絶対パスです。
  4. リモート エージェントを再起動します。

 

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.

  • ラベルなし