Class: BigBrother::Logger

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

Defined Under Namespace

Modules: Level

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



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

def initialize
  @level = Level::INFO
end

Instance Attribute Details

#levelObject

Returns the value of attribute level.



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

def level
  @level
end

Instance Method Details

#debug(message) ⇒ Object



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

def debug(message)
  EM.debug(message) if level == Level::DEBUG
end

#info(message) ⇒ Object



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

def info(message)
  EM.info(message)
end

#write(message) ⇒ Object



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

def write(message)
  info(message)
end