Module: Rox::Core::Analytics::Logging

Included in:
Client, MessageBatch, Transport, Worker
Defined in:
lib/rox/core/analytics/logging.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.loggerObject



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rox/core/analytics/logging.rb', line 32

def logger
  return @logger if @logger

  base_logger = if defined?(Rails)
                  Rails.logger
                else
                  logger = Logger.new STDOUT
                  logger.progname = 'Rox::Core::Analytics'
                  logger
                end
  @logger = PrefixedLogger.new(base_logger, '[analytics-ruby]')
end

Class Method Details

.included(base) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/rox/core/analytics/logging.rb', line 48

def self.included(base)
  class << base
    def logger
      Logging.logger
    end
  end
end

Instance Method Details

#loggerObject



56
57
58
# File 'lib/rox/core/analytics/logging.rb', line 56

def logger
  Logging.logger
end