Module: Pifan::Logging

Included in:
Process
Defined in:
lib/pifan/logging.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.levelObject



8
9
10
# File 'lib/pifan/logging.rb', line 8

def level
  @level ||= :error
end

.loggerObject



12
13
14
15
16
# File 'lib/pifan/logging.rb', line 12

def logger
  @logger ||= TTY::Logger.new do |config|
    config.level = level
  end
end

Class Method Details

.included(base) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/pifan/logging.rb', line 21

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

Instance Method Details

#loggerObject



29
30
31
# File 'lib/pifan/logging.rb', line 29

def logger
  Logging.logger
end