Log Management
Chef Automate 2.0 uses systemd
. Log management is performed according to the configuration defined for the system service journald
.
Viewing Logs
To view the logs you can run:
journalctl -u chef-automate
To follow the logs in realtime:
journalctl -u chef-automate -f
For information on changing the output, please refer to the man page or run:
journalctl --help
Configuring Log Level
You can configure Chef Automate log level for all services by creating a TOML file and configuring the log level. By default each service will initialize at the “info” level but can be any of ‘debug, ‘info’, ‘warning’, ‘panic’, or ‘fatal’.
[global.v1.log]
level = "debug"
Then run chef-automate config patch </path/to/your-file.toml>
to deploy your change.
Configuring Log Rotation and Retention
Log rotation and retention settings are managed at a system level using journald
. At this point, journald
does not support log retention policies at a granular level for units within itself. See the man page for more configuration options in /etc/systemd/journald.conf
.
Was this page helpful?