salt.modules.logadm

Module for managing Solaris logadm based log rotations.

salt.modules.logadm.list_conf(conf_file='/etc/logadm.conf', log_file=None, include_unset=False)

Show parsed configuration

New in version 2018.3.0.

conf_filestring

path to logadm.conf, defaults to /etc/logadm.conf

log_filestring

optional show only one log file

include_unsetboolean

include unset flags in output

CLI Example:

salt '*' logadm.list_conf
salt '*' logadm.list_conf log=/var/log/syslog
salt '*' logadm.list_conf include_unset=False
salt.modules.logadm.remove(name, conf_file='/etc/logadm.conf')

Remove log pattern from logadm

CLI Example:

salt '*' logadm.remove myapplog
salt.modules.logadm.rotate(name, pattern=None, conf_file='/etc/logadm.conf', **kwargs)

Set up pattern for logging.

namestring

alias for entryname

patternstring

alias for log_file

conf_filestring

optional path to alternative configuration file

kwargsboolean|string|int

optional additional flags and parameters

Note

name and pattern were kept for backwards compatibility reasons.

name is an alias for the entryname argument, pattern is an alias for log_file. These aliases will only be used if the entryname and log_file arguments are not passed.

For a full list of arguments see `logadm.show_args`.

CLI Example:

salt '*' logadm.rotate myapplog pattern='/var/log/myapp/*.log' count=7
salt '*' logadm.rotate myapplog log_file='/var/log/myapp/*.log' count=4 owner=myappd mode='0700'
salt.modules.logadm.show_args()

Show which arguments map to which flags and options.

New in version 2018.3.0.

CLI Example:

salt '*' logadm.show_args
salt.modules.logadm.show_conf(conf_file='/etc/logadm.conf', name=None)

Show configuration

conf_filestring

path to logadm.conf, defaults to /etc/logadm.conf

namestring

optional show only a single entry

CLI Example:

salt '*' logadm.show_conf
salt '*' logadm.show_conf name=/var/log/syslog