class Aspector::Logger

Default logger for Aspector @note It uses ::Logger features - providing basic logging

Attributes

context[R]

Public Class Methods

new(context) click to toggle source
Calls superclass method
# File lib/aspector/logger.rb, line 7
def initialize(context)
  super(STDOUT)
  @context = context
  @level = (ENV['ASPECTOR_LOG_LEVEL'] || ::Logger::ERROR).to_i
end

Private Instance Methods

postfix(*args) click to toggle source
# File lib/aspector/logger.rb, line 21
def postfix(*args)
  msg = []

  if context.is_a? Aspector::Base
    msg << context.class.to_s
    msg << context.target.to_s
  else
    msg << context.to_s
  end

  msg += args

  msg.join(' | ')
end