Class: FeedUpdaterLogger
- Inherits:
-
Logger
- Object
- Logger
- FeedUpdaterLogger
- Defined in:
- lib/feed_updater.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #error(message) ⇒ Object
- #fatal(message) ⇒ Object
- #info(message) ⇒ Object
- #log(level, message) ⇒ Object
- #old_log ⇒ Object
- #warn(message) ⇒ Object
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix.
86 87 88 |
# File 'lib/feed_updater.rb', line 86 def prefix @prefix end |
Instance Method Details
#debug(message) ⇒ Object
97 98 99 |
# File 'lib/feed_updater.rb', line 97 def debug() self.log(0, ) end |
#error(message) ⇒ Object
109 110 111 |
# File 'lib/feed_updater.rb', line 109 def error() self.log(3, ) end |
#fatal(message) ⇒ Object
113 114 115 |
# File 'lib/feed_updater.rb', line 113 def fatal() self.log(4, ) end |
#info(message) ⇒ Object
101 102 103 |
# File 'lib/feed_updater.rb', line 101 def info() self.log(1, ) end |
#log(level, message) ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/feed_updater.rb', line 89 def log(level, ) if defined?(@prefix) && @prefix != nil self.old_log(level, "#{self.prefix}#{}") else self.old_log(level, ) end end |
#old_log ⇒ Object
88 |
# File 'lib/feed_updater.rb', line 88 alias_method :old_log, :log |
#warn(message) ⇒ Object
105 106 107 |
# File 'lib/feed_updater.rb', line 105 def warn() self.log(2, ) end |