Module: Logging

Included in:
Loggie::Logentries::Retry, Loggie::Logentries::Search, Loggie::Request
Defined in:
lib/loggie/logging.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/loggie/logging.rb', line 14

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

.loggerObject



5
6
7
# File 'lib/loggie/logging.rb', line 5

def logger
  @logger ||= ::Logger.new(STDOUT).tap { |l| l.level = Loggie.configuration.log_level }
end

.logger=(logger) ⇒ Object



9
10
11
# File 'lib/loggie/logging.rb', line 9

def logger=(logger)
  @logger = logger
end

Instance Method Details

#loggerObject



22
23
24
# File 'lib/loggie/logging.rb', line 22

def logger
  Logging.logger
end