Class: Logging::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/logging_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Logger

Returns a new instance of Logger.



4
5
6
# File 'lib/logging_adapter.rb', line 4

def initialize(name)
  @logger = ::Slf4r::LoggerFacade.new(name)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



12
13
14
# File 'lib/logging_adapter.rb', line 12

def method_missing(method, *args, &block)
  @logger.send(method, *args, &block) if @logger.respond_to?(method)
end

Instance Method Details

#respend_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/logging_adapter.rb', line 16

def respend_to?(method)
  @logger.respond_to?(method)
end