Class: ActionPool::LogHelper
- Inherits:
-
Object
- Object
- ActionPool::LogHelper
- Defined in:
- lib/actionpool/LogHelper.rb
Instance Method Summary collapse
- #error(m) ⇒ Object
- #fatal(m) ⇒ Object
- #info(m) ⇒ Object
-
#initialize(logger = nil) ⇒ LogHelper
constructor
A new instance of LogHelper.
- #warn(m) ⇒ Object
Constructor Details
#initialize(logger = nil) ⇒ LogHelper
Returns a new instance of LogHelper.
4 5 6 7 |
# File 'lib/actionpool/LogHelper.rb', line 4 def initialize(logger=nil) require 'logger' @logger = logger end |
Instance Method Details
#error(m) ⇒ Object
21 22 23 |
# File 'lib/actionpool/LogHelper.rb', line 21 def error(m) @logger.error(m) unless @logger.nil? end |
#fatal(m) ⇒ Object
17 18 19 |
# File 'lib/actionpool/LogHelper.rb', line 17 def fatal(m) @logger.fatal(m) unless @logger.nil? end |
#info(m) ⇒ Object
9 10 11 |
# File 'lib/actionpool/LogHelper.rb', line 9 def info(m) @logger.info(m) unless @logger.nil? end |
#warn(m) ⇒ Object
13 14 15 |
# File 'lib/actionpool/LogHelper.rb', line 13 def warn(m) @logger.warn(m) unless @logger.nil? end |