Module: Eye::Logger::ObjectExt

Defined in:
lib/eye/logger.rb

Instance Method Summary collapse

Instance Method Details

#log_ex(ex) ⇒ Object


40
41
42
43
# File 'lib/eye/logger.rb', line 40

def log_ex(ex)
  error "Exception: #{ex.message} #{ex.backtrace}"
  # notify here?
end

#loggerObject


29
30
31
# File 'lib/eye/logger.rb', line 29

def logger
  @logger ||= Eye::Logger.new(logger_tag, logger_sub_tag)
end

#logger_sub_tagObject


27
# File 'lib/eye/logger.rb', line 27

def logger_sub_tag; end

#logger_tagObject


23
24
25
# File 'lib/eye/logger.rb', line 23

def logger_tag
  [Class, Module].include?(self.class) ? to_s : "<#{self.class}>"
end