Class: Semlogger::Base
Direct Known Subclasses
Class Attribute Summary collapse
-
.logger ⇒ Object
Returns the value of attribute logger.
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #add(severity, logger = nil, &block) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
39 40 41 |
# File 'lib/semlogger.rb', line 39 def initialize @logger = self.class.logger end |
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
35 36 37 |
# File 'lib/semlogger.rb', line 35 def logger @logger end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
37 38 39 |
# File 'lib/semlogger.rb', line 37 def logger @logger end |
Instance Method Details
#add(severity, logger = nil, &block) ⇒ Object
43 44 45 |
# File 'lib/semlogger.rb', line 43 def add severity, logger = nil, &block (logger || @logger).add severity, self, &block end |