Class: Rhelm::Client::SimpleLogger
- Inherits:
-
Object
- Object
- Rhelm::Client::SimpleLogger
- Defined in:
- lib/rhelm/client/simple_logger.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- LEVELS =
{ debug: 3, info: 2, warn: 1, error: 0 }
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
Instance Method Summary collapse
-
#initialize(level = :info) ⇒ SimpleLogger
constructor
A new instance of SimpleLogger.
Constructor Details
#initialize(level = :info) ⇒ SimpleLogger
Returns a new instance of SimpleLogger.
7 8 9 10 |
# File 'lib/rhelm/client/simple_logger.rb', line 7 def initialize(level = :info) raise(Error, "unknown log level #{level}") unless LEVELS.key?(level) @level = LEVELS[level] end |
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level.
6 7 8 |
# File 'lib/rhelm/client/simple_logger.rb', line 6 def level @level end |