Module: Chef::Mixin::Unformatter

Included in:
Log::Syslog, Log::WinEvt
Defined in:
lib/chef/mixin/unformatter.rb

Instance Method Summary collapse

Instance Method Details

#write(message) ⇒ Object



23
24
25
26
27
28
# File 'lib/chef/mixin/unformatter.rb', line 23

def write(message)
  data = message.match(/(\[.+?\] )?([\w]+):(.*)$/)
  send(data[2].downcase.chomp.to_sym, data[3].strip)
rescue NoMethodError
  send(:info, message)
end