Class: Chef::Log::Syslog

Inherits:
Logger::Syslog
  • Object
show all
Includes:
Mixin::Unformatter
Defined in:
lib/chef/log/syslog.rb

Overview

Chef::Log::Syslog class. usage in client.rb: log_location Chef::Log::Syslog.new("chef-client", ::Syslog::LOG_DAEMON)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Unformatter

#write

Constructor Details

#initialize(program_name = "chef-client", facility = ::Syslog::LOG_DAEMON, logopts = nil) ⇒ Syslog


35
36
37
38
39
# File 'lib/chef/log/syslog.rb', line 35

def initialize(program_name = "chef-client", facility = ::Syslog::LOG_DAEMON, logopts = nil)
  super
  return if defined? ::Logger::Syslog::SYSLOG
  ::Logger::Syslog.const_set :SYSLOG, SYSLOG
end

Instance Attribute Details

#formatterObject

Returns the value of attribute formatter


33
34
35
# File 'lib/chef/log/syslog.rb', line 33

def formatter
  @formatter
end

#syncObject

Returns the value of attribute sync


33
34
35
# File 'lib/chef/log/syslog.rb', line 33

def sync
  @sync
end

Instance Method Details

#closeObject


41
42
# File 'lib/chef/log/syslog.rb', line 41

def close
end