Class: Aspector::Logger
- Inherits:
-
Logger
- Object
- Logger
- Aspector::Logger
- Defined in:
- lib/aspector/logger.rb
Overview
Note:
It uses ::Logger features - providing basic logging
Default logger for Aspector
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(context) ⇒ Logger
constructor
A new instance of Logger.
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
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/aspector/logger.rb', line 5 def context @context end |