Module: Cabin::Mixins::Logger

Included in:
Channel
Defined in:
lib/cabin/mixins/logger.rb

Overview

This module implements methods that act somewhat like Ruby’s Logger class It is included in Cabin::Channel

Constant Summary collapse

LEVELS =
{
  :fatal => 0,
  :error => 1,
  :warn => 2,
  :info => 3,
  :debug => 4
}
BACKTRACE_RE =
/([^:]+):([0-9]+)(?::in `(.*)')?/

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#levelObject

Returns the value of attribute level.



6
7
8
# File 'lib/cabin/mixins/logger.rb', line 6

def level
  @level
end

Instance Method Details

#log(message, data = {}) ⇒ Object

def log_with_level



82
83
84
# File 'lib/cabin/mixins/logger.rb', line 82

def log(message, data={})
  _log(message, data)
end