Logs
Output
Scalr agent logs are written to stdout and stderr, which enables them to be captured by standard container runtimes, system supervisors, and log collectors. For log persistence, you must configure a log forwarding mechanism or direct the output to a file.
Log Levels
The agent supports several log levels to provide varying degrees of detail:
- error: For critical events requiring immediate attention.
- warning: For non-critical issues that may need monitoring if they occur frequently.
- info: For high-level operational activity (this is the default level).
- debug: For low-level details useful in troubleshooting.
By default, the Scalr Agent logs at the info
level. To include debug logs, enable the SCALR_AGENT_DEBUG
option.
Log Format
The log output format is configurable via the SCALR_AGENT_LOG_FORMAT
environment variable.
To enable structured logging, set SCALR_AGENT_LOG_FORMAT=json. This will switch the log output to a JSON format, as shown in the example below:
{
"agent_id": "agent-v0otjddhqsmolv765",
"agent_name": "default-agent-f73aua4",
"pool_name": "default-pool",
"event": "Scalr agent is ready to receive tasks.",
"level": "info",
"logger_name": "tacoagent.cmd",
"timestamp": "2025-07-31 10:00:33.428024",
}
Updated 1 day ago