Class: Messed::Logger
- Inherits:
-
Object
- Object
- Messed::Logger
- Defined in:
- lib/messed/logger.rb
Defined Under Namespace
Modules: LoggingModule
Constant Summary collapse
- @@instance =
self.new
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
30 31 32 |
# File 'lib/messed/logger.rb', line 30 def logger @logger end |
Class Method Details
.instance ⇒ Object
37 38 39 |
# File 'lib/messed/logger.rb', line 37 def self.instance @@instance end |
Instance Method Details
#setup_logger(logger = ::Logger.new(STDOUT), log_level = :debug) ⇒ Object
41 42 43 44 |
# File 'lib/messed/logger.rb', line 41 def setup_logger(logger = ::Logger.new(STDOUT), log_level = :debug) @logger = logger @logger.level = ::Logger.const_get(log_level.to_s.upcase.to_sym) if log_level end |