Class: MapPrint::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/map_print/logger.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



10
11
12
# File 'lib/map_print/logger.rb', line 10

def initialize
  @logger = ::Logger.new File.new('map_print.log', 'a+')
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

Class Method Details

.debug(*args) ⇒ Object



34
35
36
# File 'lib/map_print/logger.rb', line 34

def self.debug(*args)
  self.instance.debug *args
end

.error(*args) ⇒ Object



46
47
48
# File 'lib/map_print/logger.rb', line 46

def self.error(*args)
  self.instance.error *args
end

.fatal(*args) ⇒ Object



50
51
52
# File 'lib/map_print/logger.rb', line 50

def self.fatal(*args)
  self.instance.fatal *args
end

.info(*args) ⇒ Object



38
39
40
# File 'lib/map_print/logger.rb', line 38

def self.info(*args)
  self.instance.info *args
end

.warn(*args) ⇒ Object



42
43
44
# File 'lib/map_print/logger.rb', line 42

def self.warn(*args)
  self.instance.warn *args
end

Instance Method Details

#debug(*args) ⇒ Object



14
15
16
# File 'lib/map_print/logger.rb', line 14

def debug(*args)
  @logger.debug *args
end

#error(*args) ⇒ Object



26
27
28
# File 'lib/map_print/logger.rb', line 26

def error(*args)
  @logger.error *args
end

#fatal(*args) ⇒ Object



30
31
32
# File 'lib/map_print/logger.rb', line 30

def fatal(*args)
  @logger.fatal *args
end

#info(*args) ⇒ Object



18
19
20
# File 'lib/map_print/logger.rb', line 18

def info(*args)
  @logger.info *args
end

#warn(*args) ⇒ Object



22
23
24
# File 'lib/map_print/logger.rb', line 22

def warn(*args)
  @logger.warn *args
end