module MindControl::Loggable

Mixin for event logging.

Private Instance Methods

facility() click to toggle source

Returns log facility for current class: demodulized snake_cased class name. @return [String]

# File lib/mind_control/loggable.rb, line 43
def facility
  @facility ||= self.class.name.split( "::" ).last.gsub( /([a-z])([A-Z])/, "\\1_\\2" ).downcase
end
logger() click to toggle source

Returns global logger. @return [Logger, nil]

# File lib/mind_control/loggable.rb, line 35
def logger
  MindControl.logger
end