Class: Logput::Adapters::TaggedLogging

Inherits:
Base
  • Object
show all
Defined in:
lib/logput/adapters/tagged_logging.rb

Overview

Active Support Tagged Logging Adapter

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #path_override, register

Constructor Details

This class inherits a constructor from Logput::Adapters::Base

Class Method Details

.handles?(logger) ⇒ Boolean

Parameters:

  • logger (Class)

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/logput/adapters/tagged_logging.rb', line 11

def self.handles?(logger)
  return false unless logger
  logger.is_a? ::ActiveSupport::TaggedLogging
end

Instance Method Details

#pathString

Returns path.

Returns:

  • (String)

    path



17
18
19
20
# File 'lib/logput/adapters/tagged_logging.rb', line 17

def path
  return path_override if path_override
  @logger.instance_variable_get(:@logger).instance_variable_get(:@log_dest).path
end