Skip to main content

Module logging

Module logging 

Source
Expand description

Log-management actions: logrotate drop-ins + rsyslog remote forwarding.

GetLogrotateStatus is a read-only dry-run (logrotate -d). The mutating actions delegate to the root-owned helper /usr/lib/sysknife/log-edit, which validates each config before keeping it (logrotate -d for rotation, rsyslogd -N1 for forwarding) and rolls back on rejection.

Functions§

configure_log_rotation
Write a logrotate drop-in (log-edit --op logrotate …).
configure_remote_syslog
Configure rsyslog to forward all logs to a remote collector.
get_logrotate_status
Dry-run logrotate to show what would rotate (logrotate -d <conf>). Read-only — -d (debug) never actually rotates. Defaults to the main config.
remove_log_rotation
Remove a SysKnife-managed logrotate drop-in.
remove_remote_syslog
Remove the rsyslog remote-forwarding drop-in.
specs