From 6f660118b9c05e2413a9fa29574591c582f9458c Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 19 Apr 2006 15:43:19 +0000 Subject: Fixin #102. The syslog name is now either the name if the process (if that name includes "puppet" in it) or "puppet-" and the name of the process. Also removing the "alert" test messages, since they result in a wall. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1118 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/log.rb | 4 +++- test/other/log.rb | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/puppet/log.rb b/lib/puppet/log.rb index 1a392ac64..c8a44d14b 100644 --- a/lib/puppet/log.rb +++ b/lib/puppet/log.rb @@ -120,7 +120,9 @@ module Puppet if Syslog.opened? Syslog.close end - @destinations[:syslog] = Syslog.open("puppet") + name = Puppet.name + name = "puppet-#{name}" unless name =~ /puppet/ + @destinations[:syslog] = Syslog.open(name) when /^\// # files Puppet.info "opening %s as a log" % dest # first make sure the directory exists diff --git a/test/other/log.rb b/test/other/log.rb index a138b198b..7555b9cb6 100644 --- a/test/other/log.rb +++ b/test/other/log.rb @@ -37,6 +37,7 @@ class TestLog < Test::Unit::TestCase def mkmsgs(levels) levels.collect { |level| + next if level == :alert assert_nothing_raised() { Puppet::Log.new( :level => level, -- cgit