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::Dist::CLIENT}", facility = ::Syslog::LOG_DAEMON, logopts = nil) ⇒ Syslog

Returns a new instance of Syslog.



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

def initialize(program_name = "#{Chef::Dist::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.



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

def formatter
  @formatter
end

#syncObject

Returns the value of attribute sync.



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

def sync
  @sync
end

Instance Method Details

#closeObject



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

def close; end