Class: Chef::Log

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

Defined Under Namespace

Classes: Formatter

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.verbose_loggerObject (readonly)

Returns the value of attribute verbose_logger.



28
29
30
# File 'lib/chef/log.rb', line 28

def verbose_logger
  @verbose_logger
end

Class Method Details

.<<(msg) ⇒ Object



68
69
70
# File 'lib/chef/log.rb', line 68

def <<(msg)
  @logger << msg
end

.add(severity, message = nil, progname = nil, &block) ⇒ Object



72
73
74
# File 'lib/chef/log.rb', line 72

def add(severity, message = nil, progname = nil, &block)
  @logger.add(severity, message = nil, progname = nil, &block)
end

.verbose=(value) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/chef/log.rb', line 39

def verbose=(value)
  if value
    @verbose = true
    @verbose_logger ||= Logger.new(STDOUT)
    @verbose_logger.level = self.logger.level
    @verbose_logger.formatter = self.logger.formatter
  else
    @verbose, @verbose_logger = false, nil
  end
  self.verbose
end

.verbose?Boolean Also known as: verbose

Returns:

  • (Boolean)


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

def verbose?
  @verbose
end