Class: Startback::Support::Logger
- Inherits:
-
Logger
- Object
- Logger
- Startback::Support::Logger
- Defined in:
- lib/startback/support/logger.rb
Overview
A Logger extension that sends info and debug messages to STDOUT and other messages to STDERR. This is not configurable.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #error(*args, &bl) ⇒ Object
- #fatal(*args, &bl) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #warn(*args, &bl) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
9 10 11 12 |
# File 'lib/startback/support/logger.rb', line 9 def initialize super(STDOUT) @err_logger = ::Logger.new(STDERR) end |
Class Method Details
.level=(level) ⇒ Object
14 15 16 17 18 |
# File 'lib/startback/support/logger.rb', line 14 def self.level=(level) super.tap{ @err_logger.level = level } end |
Instance Method Details
#error(*args, &bl) ⇒ Object
24 25 26 |
# File 'lib/startback/support/logger.rb', line 24 def error(*args, &bl) @err_logger.error(*args, &bl) end |
#fatal(*args, &bl) ⇒ Object
28 29 30 |
# File 'lib/startback/support/logger.rb', line 28 def fatal(*args, &bl) @err_logger.fatal(*args, &bl) end |
#warn(*args, &bl) ⇒ Object
20 21 22 |
# File 'lib/startback/support/logger.rb', line 20 def warn(*args, &bl) @err_logger.warn(*args, &bl) end |