Class: NullLogger
- Inherits:
-
Object
- Object
- NullLogger
- Defined in:
- lib/cookbook_creator/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
- #<<(message) ⇒ Object
- #add(severity, message = nil, progname = nil) ⇒ Object
- #debug(message, &block) ⇒ Object
- #debug? ⇒ Boolean
- #error(message, &block) ⇒ Object
- #error? ⇒ Boolean
- #fatal(message, &block) ⇒ Object
- #fatal? ⇒ Boolean
- #info(message, &block) ⇒ Object
- #info? ⇒ Boolean
- #warn(message, &block) ⇒ Object
- #warn? ⇒ Boolean
Instance Method Details
#<<(message) ⇒ Object
47 48 |
# File 'lib/cookbook_creator/null_logger.rb', line 47 def <<() end |
#add(severity, message = nil, progname = nil) ⇒ Object
44 45 |
# File 'lib/cookbook_creator/null_logger.rb', line 44 def add(severity, =nil, progname=nil) end |
#debug(message, &block) ⇒ Object
41 42 |
# File 'lib/cookbook_creator/null_logger.rb', line 41 def debug(, &block) end |
#debug? ⇒ Boolean
66 67 68 |
# File 'lib/cookbook_creator/null_logger.rb', line 66 def debug? false end |
#error(message, &block) ⇒ Object
32 33 |
# File 'lib/cookbook_creator/null_logger.rb', line 32 def error(, &block) end |
#error? ⇒ Boolean
54 55 56 |
# File 'lib/cookbook_creator/null_logger.rb', line 54 def error? false end |
#fatal(message, &block) ⇒ Object
29 30 |
# File 'lib/cookbook_creator/null_logger.rb', line 29 def fatal(, &block) end |
#fatal? ⇒ Boolean
50 51 52 |
# File 'lib/cookbook_creator/null_logger.rb', line 50 def fatal? false end |
#info(message, &block) ⇒ Object
38 39 |
# File 'lib/cookbook_creator/null_logger.rb', line 38 def info(, &block) end |
#info? ⇒ Boolean
62 63 64 |
# File 'lib/cookbook_creator/null_logger.rb', line 62 def info? false end |
#warn(message, &block) ⇒ Object
35 36 |
# File 'lib/cookbook_creator/null_logger.rb', line 35 def warn(, &block) end |
#warn? ⇒ Boolean
58 59 60 |
# File 'lib/cookbook_creator/null_logger.rb', line 58 def warn? false end |