Module: ReVIEW::Loggable
- Included in:
- Builder, Compiler, EPUBMaker, EPUBMaker::Producer, IDGXMLMaker, ImgMath, PDFMaker, Preprocessor, Preprocessor::Repository, TEXTMaker, WEBMaker
- Defined in:
- lib/review/loggable.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #app_error(msg) ⇒ Object
- #debug(msg, location: nil) ⇒ Object
- #error(msg, location: nil) ⇒ Object
- #error!(msg, location: nil) ⇒ Object
- #warn(msg, location: nil) ⇒ Object
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
3 4 5 |
# File 'lib/review/loggable.rb', line 3 def logger @logger end |
Instance Method Details
#app_error(msg) ⇒ Object
9 10 11 |
# File 'lib/review/loggable.rb', line 9 def app_error(msg) raise ApplicationError, msg end |
#debug(msg, location: nil) ⇒ Object
23 24 25 |
# File 'lib/review/loggable.rb', line 23 def debug(msg, location: nil) logger.debug(msg, location: location) end |
#error(msg, location: nil) ⇒ Object
5 6 7 |
# File 'lib/review/loggable.rb', line 5 def error(msg, location: nil) logger.error(msg, location: location) end |
#error!(msg, location: nil) ⇒ Object
13 14 15 16 17 |
# File 'lib/review/loggable.rb', line 13 def error!(msg, location: nil) logger.error(msg, location: location) exit 1 end |
#warn(msg, location: nil) ⇒ Object
19 20 21 |
# File 'lib/review/loggable.rb', line 19 def warn(msg, location: nil) logger.warn(msg, location: location) end |