Module: Gryphon::Logging

Includes:
Kernel
Included in:
Nest
Defined in:
lib/gryphon/logging.rb

Overview

Mixin class for setting up log creation and logging

Instance Method Summary collapse

Instance Method Details

#log(msg, lvl = Logger::INFO) ⇒ Object

Parameters:

  • msg (String)
  • lvl (Integer) (defaults to: Logger::INFO)


12
13
14
15
# File 'lib/gryphon/logging.rb', line 12

def log(msg, lvl = Logger::INFO)
  @logger ||= create
  @logger.add(lvl, msg)
end