summaryrefslogtreecommitdiff
path: root/lib/chef/log
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-07 06:57:51 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-07 06:57:51 -0700
commit08b1270498b1555ddfbbafb8d8a9780ebd0b1671 (patch)
treeea11695d7c6a5e01fab2aa629b99029b7fea0b8a /lib/chef/log
parent945684b71f13b7efae8d4d937f57119784536376 (diff)
downloadchef-08b1270498b1555ddfbbafb8d8a9780ebd0b1671.tar.gz
Update syslog to use Unformatter mixin
Diffstat (limited to 'lib/chef/log')
-rw-r--r--lib/chef/log/syslog.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/chef/log/syslog.rb b/lib/chef/log/syslog.rb
index fcb3c972e8..0c8190797f 100644
--- a/lib/chef/log/syslog.rb
+++ b/lib/chef/log/syslog.rb
@@ -18,6 +18,7 @@
require 'logger'
require 'syslog-logger'
+require 'chef/mixin/unformatter'
class Chef
class Log
@@ -27,6 +28,8 @@ class Chef
# log_location Chef::Log::Syslog.new("chef-client", ::Syslog::LOG_DAEMON)
#
class Syslog < Logger::Syslog
+ include Chef::Mixin::Unformatter
+
attr_accessor :sync, :formatter
def initialize(program_name = 'chef-client', facility = ::Syslog::LOG_DAEMON, logopts=nil)
@@ -35,13 +38,6 @@ class Chef
::Logger::Syslog.const_set :SYSLOG, SYSLOG
end
- def write(message)
- data = message.match(/(\[.+?\]) ([\w]+):(.*)$/)
- self.send(data[2].downcase.to_sym, data[3].strip)
- rescue NoMethodError
- self.send(:info, message)
- end
-
def close
end
end