Class: Aspector::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/aspector/logger.rb

Overview

Note:

It uses ::Logger features - providing basic logging

Default logger for Aspector

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Logger

Returns a new instance of Logger.



7
8
9
10
11
# File 'lib/aspector/logger.rb', line 7

def initialize(context)
  super(STDOUT)
  @context = context
  @level = (ENV['ASPECTOR_LOG_LEVEL'] || ::Logger::ERROR).to_i
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/aspector/logger.rb', line 5

def context
  @context
end