Class: ChefCore::Log

Inherits:
Object
  • Object
show all
Extended by:
Mixlib::Log
Defined in:
lib/chef_core/log.rb

Class Method Summary collapse

Class Method Details

.locationObject



37
38
39
# File 'lib/chef_core/log.rb', line 37

def self.location
  @location
end

.setup(location, log_level) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/chef_core/log.rb', line 24

def self.setup(location, log_level)
  if location.is_a?(String)
    if location.casecmp("stdout") == 0
      location = $stdout
    else
      location = File.open(location, "w+")
    end
  end
  @location = location
  init(location)
  Log.level = log_level
end