summaryrefslogtreecommitdiff
path: root/puppet/modules/leap/manifests/logfile.pp
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-02-02 10:21:49 -0800
committerelijah <elijah@riseup.net>2016-02-02 10:21:49 -0800
commit45e81ca4abc81600998f11a5e74a565f545e6c84 (patch)
tree832044b8ca8eb14aa09aefcb78ed1a25f9f77200 /puppet/modules/leap/manifests/logfile.pp
parentedc9aa13f5ebb07f27e73fd4befc5fbbadfebc66 (diff)
finally fix leap-mx logging, for the last time, hopefully.
Diffstat (limited to 'puppet/modules/leap/manifests/logfile.pp')
-rw-r--r--puppet/modules/leap/manifests/logfile.pp15
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')