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 Oxygen.

conf_file
: string
path to logadm.conf, defaults to /etc/logadm.conf
log_file
: string
optional show only one log file
include_unset
: boolean
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.

name
: string
alias for entryname
pattern
: string
alias for log_file
conf_file
: string
optional path to alternative configuration file
**kwargs
: boolean|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 aliasses wil 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(*args, **kwargs)

Show which arguments map to which flags and options.

New in version Oxygen.

CLI Example:

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

Show configuration

conf_file
: string
path to logadm.conf, defaults to /etc/logadm.conf
name
: string
optional show only a single entry

CLI Example:

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