Class: Semlogger::Base

Inherits:
Object show all
Defined in:
lib/semlogger.rb

Direct Known Subclasses

CustomType

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

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

.loggerObject

Returns the value of attribute logger.



35
36
37
# File 'lib/semlogger.rb', line 35

def logger
  @logger
end

Instance Attribute Details

#loggerObject

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