diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-04 16:34:04 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-04 16:34:04 +0000 |
| commit | 30fa686137993ab35fbc135b499f8c5f4ad7ec8b (patch) | |
| tree | fb363c0af14553c4a61c9d303ae843a9e649e1d8 /lib/puppet | |
| parent | da0c862bad2aaa8a7b318314c02e8e6d5f98807f (diff) | |
Adding configurability to the syslog facility, using the "logfacility" parameter.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1724 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/log.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/log.rb b/lib/puppet/log.rb index ee825e406..b99108172 100644 --- a/lib/puppet/log.rb +++ b/lib/puppet/log.rb @@ -181,7 +181,12 @@ module Puppet options = Syslog::LOG_PID | Syslog::LOG_NDELAY # XXX This should really be configurable. - facility = Syslog::LOG_DAEMON + str = Puppet[:logfacility] + begin + facility = Syslog.const_get("LOG_#{str.upcase}") + rescue NameError + raise Puppet::Error, "Invalid syslog facility %s" % str + end @syslog = Syslog.open(name, options, facility) end |
