Class: LanGrove::FakeLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/langrove/ext/fake_logger.rb

Class Method Summary collapse

Class Method Details

.debug(msg) ⇒ Object



23
24
25
26
27
# File 'lib/langrove/ext/fake_logger.rb', line 23

def debug( msg )

  puts "LOG.debug: [#{msg}]" unless @silent

end

.error(msg) ⇒ Object



41
42
43
44
45
# File 'lib/langrove/ext/fake_logger.rb', line 41

def error( msg )

  puts "LOG.error: [#{msg}]" unless @silent

end

.info(msg) ⇒ Object



29
30
31
32
33
# File 'lib/langrove/ext/fake_logger.rb', line 29

def info( msg )

  puts "LOG.info: [#{msg}]" unless @silent

end

.offObject



17
18
19
20
21
# File 'lib/langrove/ext/fake_logger.rb', line 17

def off

  @silent = true

end

.onObject



11
12
13
14
15
# File 'lib/langrove/ext/fake_logger.rb', line 11

def on

  @silent = false

end

.warn(msg) ⇒ Object



35
36
37
38
39
# File 'lib/langrove/ext/fake_logger.rb', line 35

def warn( msg )

  puts "LOG.warn: [#{msg}]" unless @silent

end