Method: Puppet::Util::Log.newmessage
- Defined in:
- lib/puppet/util/log.rb
.newmessage(msg) ⇒ Object
Route the actual message. FIXME There are lots of things this method should do, like caching and a bit more. It’s worth noting that there’s a potential for a loop here, if the machine somehow gets the destination set as itself.
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/puppet/util/log.rb', line 193 def Log.(msg) return if @levels.index(msg.level) < @loglevel msg. = coerce_string(msg.) msg.source = coerce_string(msg.source) (msg) if @destinations.length == 0 @destinations.each do |_name, dest| dest.handle(msg) end end |