Logs
Configure where Atmos writes logs and at what verbosity level. Proper log configuration is essential for debugging and for CI/CD pipelines where you need to separate log output from command results.
Configuration
Logs are configured in the logs section:
atmos.yaml
logs.fileThe file to write Atmos logs to. Logs can be written to any file or any standard file descriptor, including
/dev/stdout,/dev/stderrand/dev/null. If omitted,/dev/stdoutwill be used. Can also be set usingATMOS_LOGS_FILEenvironment variable.logs.levelLog level. Supported log levels are
Trace,Debug,Info,Warning,Off. If the log level is set toOff, Atmos will not log any messages (note that this does not prevent other tools like Terraform from logging). Can also be set usingATMOS_LOGS_LEVELenvironment variable.
Disabling Logs
To prevent Atmos from logging any messages (except for the outputs of the executed commands), you can do one of the following:
- Set
logs.fileor the ENV variableATMOS_LOGS_FILEto/dev/null - Set
logs.levelor the ENV variableATMOS_LOGS_LEVELtoOff
Logs in CI/CD Pipelines
When you set the log level to Debug or Trace, Atmos will log additional messages before printing the output of an executed command.
Problem: Mixed Output
Consider the atmos describe affected command with verbose logging:
atmos.yaml
With logs.level: Trace and logs.file: "/dev/stdout", all messages and JSON output go to the same stream. This breaks JSON parsing with tools like jq.
Solution: Separate Streams
Set logs.file to /dev/stderr in atmos.yaml:
atmos.yaml
Now log messages go to /dev/stderr while command output goes to /dev/stdout:
This allows jq to parse the JSON output without errors while still logging debug information.
Environment Variables
ATMOS_LOGS_FILE- File or standard file descriptor to write logs to.
ATMOS_LOGS_LEVEL- Log level:
Trace,Debug,Info,Warning,Off.
See Also
- CLI Configuration — Overview of CLI configuration
- Environment Variables — All configuration environment variables