Class: BigBrother::Logger
- Inherits:
-
Object
- Object
- BigBrother::Logger
- Defined in:
- lib/big_brother/logger.rb
Defined Under Namespace
Modules: Level
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #info(message) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #write(message) ⇒ Object
Constructor Details
#initialize ⇒ Logger
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
#level ⇒ Object
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() EM.debug() if level == Level::DEBUG end |
#info(message) ⇒ Object
18 19 20 |
# File 'lib/big_brother/logger.rb', line 18 def info() EM.info() end |
#write(message) ⇒ Object
14 15 16 |
# File 'lib/big_brother/logger.rb', line 14 def write() info() end |