Module: Larrow::Qingcloud::Logger::ClassMethods

Defined in:
lib/larrow/qingcloud/logger.rb

Instance Method Summary collapse

Instance Method Details

#debug(msg) ⇒ Object



25
26
27
# File 'lib/larrow/qingcloud/logger.rb', line 25

def debug(msg)
  logger.debug msg
end

#err(msg) ⇒ Object



33
34
35
# File 'lib/larrow/qingcloud/logger.rb', line 33

def err(msg)
  logger.error msg
end

#info(msg) ⇒ Object



29
30
31
# File 'lib/larrow/qingcloud/logger.rb', line 29

def info(msg)
  logger.info msg
end

#loggerObject



15
16
17
18
19
20
21
22
23
# File 'lib/larrow/qingcloud/logger.rb', line 15

def logger
  @logger ||= begin
                if Qingcloud.class_variable_defined? '@@logger'
                  Qingcloud.class_variable_get '@@logger'
                else
                  ::Logger.new('qingcloud.log')
                end
              end
end