Class: Bellboy::Logger
- Inherits:
-
Object
- Object
- Bellboy::Logger
- Defined in:
- lib/bellboy/logger.rb
Overview
Simple stdout logger
Instance Method Summary collapse
-
#debug(message) ⇒ Object
(also: #verbose)
Output a debug message.
-
#initialize(options = {}) ⇒ Logger
constructor
A new instance of Logger.
-
#log(message) ⇒ Object
Output a normal informational message.
Constructor Details
#initialize(options = {}) ⇒ Logger
Returns a new instance of Logger.
26 27 28 |
# File 'lib/bellboy/logger.rb', line 26 def initialize( = {}) @loglevel = level() end |
Instance Method Details
#debug(message) ⇒ Object Also known as: verbose
Output a debug message
36 37 38 |
# File 'lib/bellboy/logger.rb', line 36 def debug() $stderr.puts() unless @loglevel < Bellboy::LOG_LEVEL_DEBUG end |
#log(message) ⇒ Object
Output a normal informational message
31 32 33 |
# File 'lib/bellboy/logger.rb', line 31 def log() puts() unless @loglevel < Bellboy::LOG_LEVEL_INFO end |