Class: FFWD::ClassLogger
- Inherits:
-
Object
- Object
- FFWD::ClassLogger
- Defined in:
- lib/ffwd/logging.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #debug? ⇒ Boolean
- #error(message, e = nil) ⇒ Object
- #info(message) ⇒ Object
-
#initialize(klass) ⇒ ClassLogger
constructor
A new instance of ClassLogger.
- #warning(message) ⇒ Object
Constructor Details
#initialize(klass) ⇒ ClassLogger
Returns a new instance of ClassLogger.
85 86 87 |
# File 'lib/ffwd/logging.rb', line 85 def initialize klass @progname = klass.name end |
Instance Method Details
#debug(message) ⇒ Object
93 94 95 |
# File 'lib/ffwd/logging.rb', line 93 def debug FFWD.log.debug(@progname){} end |
#error(message, e = nil) ⇒ Object
105 106 107 108 109 110 111 112 113 114 |
# File 'lib/ffwd/logging.rb', line 105 def error , e=nil FFWD.log.error(@progname){} return unless e FFWD.log.error(@progname){"Caused by #{e.class}: #{e}"} e.backtrace.each do |b| FFWD.log.error(@progname){" #{b}"} end end |