Module: Kitchen::Logging

Overview

Mixin module that delegates logging methods to a local ‘#logger`.

Instance Method Summary collapse

Instance Method Details

Log a message with severity of banner

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



45
# File 'lib/kitchen/logging.rb', line 45

logger_method :banner

#debug { ... } ⇒ nil, true

Log a message with severity of debug

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



46
# File 'lib/kitchen/logging.rb', line 46

logger_method :debug

#error { ... } ⇒ nil, true

Log a message with severity of error

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



49
# File 'lib/kitchen/logging.rb', line 49

logger_method :error

#fatal { ... } ⇒ nil, true

Log a message with severity of fatal

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



50
# File 'lib/kitchen/logging.rb', line 50

logger_method :fatal

#info { ... } ⇒ nil, true

Log a message with severity of info

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



47
# File 'lib/kitchen/logging.rb', line 47

logger_method :info

#warn { ... } ⇒ nil, true

Log a message with severity of warn

Yields:

  • evaluates to the message to log. This is not evaluated unless the logger’s level is sufficient to log the message. This allows you to create potentially expensive logging messages that are only called when the logger is configured to show them.



48
# File 'lib/kitchen/logging.rb', line 48

logger_method :warn