Class: Peatio::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/peatio/logger.rb

Class Method Summary collapse

Class Method Details

.debug(progname = nil, &block) ⇒ Object


12
13
14
# File 'lib/peatio/logger.rb', line 12

def debug(progname = nil, &block)
  logger.debug(progname, &block)
end

.error(progname = nil, &block) ⇒ Object


24
25
26
# File 'lib/peatio/logger.rb', line 24

def error(progname = nil, &block)
  logger.error(progname, &block)
end

.fatal(progname = nil, &block) ⇒ Object


28
29
30
# File 'lib/peatio/logger.rb', line 28

def fatal(progname = nil, &block)
  logger.fatal(progname, &block)
end

.info(progname = nil, &block) ⇒ Object


16
17
18
# File 'lib/peatio/logger.rb', line 16

def info(progname = nil, &block)
  logger.info(progname, &block)
end

.levelObject


8
9
10
# File 'lib/peatio/logger.rb', line 8

def level
  (ENV["LOG_LEVEL"] || "debug").downcase.to_sym
end

.loggerObject


4
5
6
# File 'lib/peatio/logger.rb', line 4

def logger
  @logger ||= ::Logger.new(STDERR, level: level)
end

.unknown(progname = nil, &block) ⇒ Object


32
33
34
# File 'lib/peatio/logger.rb', line 32

def unknown(progname = nil, &block)
  logger.unknown(progname, &block)
end

.warn(progname = nil, &block) ⇒ Object


20
21
22
# File 'lib/peatio/logger.rb', line 20

def warn(progname = nil, &block)
  logger.warn(progname, &block)
end