Class: Delayed::DelayedMerbLogger
- Extended by:
- Forwardable
- Defined in:
- lib/delayed/worker.rb
Instance Method Summary collapse
- #add(level, message) ⇒ Object
- #choose_level(level) ⇒ Object
-
#initialize ⇒ DelayedMerbLogger
constructor
A new instance of DelayedMerbLogger.
Constructor Details
#initialize ⇒ DelayedMerbLogger
Returns a new instance of DelayedMerbLogger.
10 11 12 |
# File 'lib/delayed/worker.rb', line 10 def initialize @logger = Merb.logger end |
Instance Method Details
#add(level, message) ⇒ Object
16 17 18 |
# File 'lib/delayed/worker.rb', line 16 def add(level, ) self.__send__(choose_level(level), ) end |
#choose_level(level) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/delayed/worker.rb', line 20 def choose_level(level) case level when Logger::FATAL then :fatal when Logger::ERROR then :error when Logger::WARN then :warn when Logger::DEBUG then :debug else :info end end |