Module: Alexandria::Logging

Overview

A mixin to include a log instance method for objects or a static log method for classes and modules. In either case, a LogWrapper is returned which wraps the Alexandria log and specifies the appropriate source object, class or module.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



123
124
125
# File 'lib/alexandria/logging.rb', line 123

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#logObject



127
128
129
# File 'lib/alexandria/logging.rb', line 127

def log
  @log_wrapper ||= LogWrapper.new(Alexandria.log, self)
end