Method: F4R::F4RLogger#debug

Defined in:
lib/f4r.rb

#debug(msg = '', items = {}) {|block| ... } ⇒ String

DEBUG level messages.

Example:

>> Log.debug [self.class, __method__], {a:1, b:2}
=> DEBUG  <F4R::Record#fields> a: 1 b: 2

Parameters:

  • msg (String, Array<String>) (defaults to: '')

    Mostly used to locate or describe items in the items parameter.

    String: Simple text message.

    Array<String>: List of key words to be concatenated with a ‘#’ inside ‘<>’ (see: #format_message). Meant to be used for describing the class and method where the log message was called from.

    Example:
      >> ['F4R::Record', 'fields'] #=> '<F4R::Record#fields>'
    
  • items (Hash) (defaults to: {})

    Key/Value list of items for debugging.

Yields:

  • (block)

    passed directly to the [F4RLogger] logger.

Returns:

  • (String)

    formatted message.



223
224
225
# File 'lib/f4r.rb', line 223

def debug(msg = '', items = {},  &block)
  logger.debug(format_message(msg, items), &block)
end