summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-07 07:27:39 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-07 07:27:39 -0700
commitd7944227b284b6b75d638d1a2a4ea917857c3f4c (patch)
tree802a5e376b7704fd51b8e5bbffc876faa8bfd99c /lib/chef/mixin
parentbec569e7940ef7df51e448e92343e2440d999173 (diff)
downloadchef-d7944227b284b6b75d638d1a2a4ea917857c3f4c.tar.gz
Allow unformatter to work when logger is not showing timestamps
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r--lib/chef/mixin/unformatter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/mixin/unformatter.rb b/lib/chef/mixin/unformatter.rb
index 7882141629..aa5977edd7 100644
--- a/lib/chef/mixin/unformatter.rb
+++ b/lib/chef/mixin/unformatter.rb
@@ -21,8 +21,8 @@ class Chef
module Unformatter
def write(message)
- data = message.match(/(\[.+?\]) ([\w]+):(.*)$/)
- self.send(data[2].downcase.to_sym, data[3].strip)
+ data = message.match(/(\[.+?\] )?([\w]+):(.*)$/)
+ self.send(data[2].downcase.chomp.to_sym, data[3].strip)
rescue NoMethodError
self.send(:info, message)
end