CloudBees Build Acceleration automatically rotates session logs using default settings. The session log naming conventions and rotation behaviors are as follows:
-
stdout or stderr logs go to
consoleN.log
(where N is the agent number). -
Normal session trace messages go to
ecagentN.log
(where N is the agent number). -
Only session trace logs will be rotated.
-
The default size limit for log files before being rotated is 1 GB.
-
The default number of rotated files to keep is 20. When that limit is reached, the oldest log files will begin to be deleted to make space for newer logs.
-
The most recent log messages are in
ecagentN.log
. When the log file reaches its size limit, that file is renamed toecagentN.log.1
. IfecagentN.log.1
already exists, then it is renamed toecagentN.log.2
beforeecagentN.log
is renamed toecagentN.log.1
. IfecagentN.log.2
exists, it is first renamed toecagentN.log.3
and so on. This rotation continues until the retain count is met, at which point file deletion begins.
To configure agent log rotation, you edit the runagent.local
file:
-
Navigate to the
<ECloud install>\<arch>\bin
directory. -
Open the
runagent.local
file. If this file does not already exist, you must create it. This file uses Tcl script syntax. -
Add the desired options using this format:
session logger <option>
For example: session logger retaincount 10
Available log rotation options:
Option | Description |
---|---|
|
Get or set the maximum file size for log files before they are rotated. The default is 1 GB. |
|
Get or set the file name to log to. The default for UNIX is |
|
Get or set the number of rotated log files to retain before starting to delete them. The default is 20. To turn off log rotation, set to 0. |
|
Clear the contents of the ecagent N .log file. This is useful when log rotation is turned off. |