puppetlabs/puppet · error · Puppet::Error
Invalid syslog facility %{str}
Error message
Invalid syslog facility %{str} What it means
Error "Invalid syslog facility %{str}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/util/log/destinations.rb:23
Puppet.features.syslog?
end
def close
Syslog.close
end
def initialize
Syslog.close if Syslog.opened?
name = "puppet-#{Puppet.run_mode.name}"
options = Syslog::LOG_PID | Syslog::LOG_NDELAY
# XXX This should really be configurable.
str = Puppet[:syslogfacility]
begin
facility = Syslog.const_get("LOG_#{str.upcase}")
rescue NameError => e
raise Puppet::Error, _("Invalid syslog facility %{str}") % { str: str }, e.backtrace
end
@syslog = Syslog.open(name, options, facility)
end
def handle(msg)
# XXX Syslog currently has a bug that makes it so you
# cannot log a message with a '%' in it. So, we get rid
# of them.
if msg.source == "Puppet"
msg.to_s.split("\n").each do |line|
@syslog.send(msg.level, line.gsub("%", '%%'))
end
else
msg.to_s.split("\n").each do |line|
@syslog.send(msg.level, "(%s) %s" % [msg.source.to_s.delete("%"),
line.gsub("%", '%%')])
endView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/util/log/destinations.rb:23 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/8ee80a4522d0af3d.
Report an issue: GitHub.