Class: Chef::NullLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/null_logger.rb

Overview

Null logger implementation that just ignores everything. This is used by classes that are intended to be reused outside of Chef, but need to offer logging functionality when used by other Chef code.

It does not define the full interface provided by Logger, just enough to be a reasonable duck type. In particular, methods setting the log level, log device, etc., are not implemented because any code calling those methods probably expected a real logger and not this "fake" one.

Instance Method Summary collapse

Instance Method Details

#<<(message) ⇒ Object



44
# File 'lib/chef/null_logger.rb', line 44

def <<(message); end

#add(severity, message = nil, progname = nil) ⇒ Object



42
# File 'lib/chef/null_logger.rb', line 42

def add(severity, message = nil, progname = nil); end

#debug(message, &block) ⇒ Object



38
# File 'lib/chef/null_logger.rb', line 38

def debug(message, &block); end

#debug?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/chef/null_logger.rb', line 62

def debug?
  false
end

#error(message, &block) ⇒ Object



32
# File 'lib/chef/null_logger.rb', line 32

def error(message, &block); end

#error?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/chef/null_logger.rb', line 50

def error?
  false
end

#fatal(message, &block) ⇒ Object



30
# File 'lib/chef/null_logger.rb', line 30

def fatal(message, &block); end

#fatal?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/chef/null_logger.rb', line 46

def fatal?
  false
end

#info(message, &block) ⇒ Object



36
# File 'lib/chef/null_logger.rb', line 36

def info(message, &block); end

#info?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/chef/null_logger.rb', line 58

def info?
  false
end

#trace(message, &block) ⇒ Object



40
# File 'lib/chef/null_logger.rb', line 40

def trace(message, &block); end

#trace?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/chef/null_logger.rb', line 66

def trace?
  false
end

#warn(message, &block) ⇒ Object



34
# File 'lib/chef/null_logger.rb', line 34

def warn(message, &block); end

#warn?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/chef/null_logger.rb', line 54

def warn?
  false
end