diff options
author | elijah <elijah@riseup.net> | 2016-02-02 17:33:38 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-02-02 17:33:38 -0800 |
commit | cf50f84d47fe20f72aebdad1fa0c077c350e1d00 (patch) | |
tree | a2a4bed1a550f071df9c7fcc922269f1b3582a65 /puppet/modules/leap/manifests/logfile.pp | |
parent | 49c8a0c2a5ff413430b4bf7cc90f39f28c936b3e (diff) | |
parent | 45e81ca4abc81600998f11a5e74a565f545e6c84 (diff) |
Merge branch 'bugfix/mxlog' into develop
Diffstat (limited to 'puppet/modules/leap/manifests/logfile.pp')
-rw-r--r-- | puppet/modules/leap/manifests/logfile.pp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/puppet/modules/leap/manifests/logfile.pp b/puppet/modules/leap/manifests/logfile.pp index 63dbd16b..adb3ca8a 100644 --- a/puppet/modules/leap/manifests/logfile.pp +++ b/puppet/modules/leap/manifests/logfile.pp @@ -1,9 +1,18 @@ # # make syslog log to a particular file for a particular process. # - -define leap::logfile($process=$name) { - $logfile = "/var/log/leap/${name}.log" +# arguments: +# +# * name: what config files are named as (eg. /etc/rsyslog.d/50-$name.conf) +# * log: the full path of the log file (defaults to /var/log/leap/$name.log +# * process: the syslog tag to filter on (defaults to name) +# +define leap::logfile($process = $name, $log = undef) { + if $log { + $logfile = $log + } else { + $logfile = "/var/log/leap/${name}.log" + } rsyslog::snippet { "50-${name}": content => template('leap/rsyslog.erb') |