summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-19 15:43:19 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-04-19 15:43:19 +0000
commit6f660118b9c05e2413a9fa29574591c582f9458c (patch)
treeec28587349e6b4aaad2edf9965208f7b12358a16
parentd2634baa0ec8dc00170bd54bea25f526c8a7ed97 (diff)
downloadpuppet-6f660118b9c05e2413a9fa29574591c582f9458c.tar.gz
puppet-6f660118b9c05e2413a9fa29574591c582f9458c.tar.xz
puppet-6f660118b9c05e2413a9fa29574591c582f9458c.zip
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
-rw-r--r--lib/puppet/log.rb4
-rw-r--r--test/other/log.rb1
2 files changed, 4 insertions, 1 deletions
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,