Class: Pazuzu::Utility::AnnotatedLogger
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Pazuzu::Utility::AnnotatedLogger
- Defined in:
- lib/pazuzu/utility/annotated_logger.rb
Overview
Logger which annotates all log messages.
Instance Method Summary collapse
- #add(severity, message = nil, progname = nil, &block) ⇒ Object
- #debug(message = nil, &block) ⇒ Object
- #error(message = nil, &block) ⇒ Object
- #info(message = nil, &block) ⇒ Object
-
#initialize(logger, prefix) ⇒ AnnotatedLogger
constructor
A new instance of AnnotatedLogger.
- #warn(message = nil, &block) ⇒ Object
Constructor Details
permalink #initialize(logger, prefix) ⇒ AnnotatedLogger
Returns a new instance of AnnotatedLogger.
7 8 9 10 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 7 def initialize(logger, prefix) super(logger) @prefix = prefix end |
Instance Method Details
permalink #add(severity, message = nil, progname = nil, &block) ⇒ Object
[View source]
28 29 30 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 28 def add(severity, = nil, progname = nil, &block) __getobj__.add(severity, (), progname, &block) end |
permalink #debug(message = nil, &block) ⇒ Object
[View source]
12 13 14 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 12 def debug( = nil, &block) __getobj__.debug((), &block) end |
permalink #error(message = nil, &block) ⇒ Object
[View source]
24 25 26 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 24 def error( = nil, &block) __getobj__.error((), &block) end |
permalink #info(message = nil, &block) ⇒ Object
[View source]
16 17 18 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 16 def info( = nil, &block) __getobj__.info((), &block) end |
permalink #warn(message = nil, &block) ⇒ Object
[View source]
20 21 22 |
# File 'lib/pazuzu/utility/annotated_logger.rb', line 20 def warn( = nil, &block) __getobj__.warn((), &block) end |