Module: Listen::Internals::Logging
- Included in:
- Listener
- Defined in:
- lib/listen/internals/logging.rb
Instance Method Summary collapse
- #_debug(*args, &block) ⇒ Object
- #_error_exception(fmt) ⇒ Object
- #_format_error(fmt) ⇒ Object
- #_info(*args, &block) ⇒ Object
- #_log(*args, &block) ⇒ Object
- #_warn(*args, &block) ⇒ Object
Instance Method Details
#_debug(*args, &block) ⇒ Object
14 15 16 |
# File 'lib/listen/internals/logging.rb', line 14 def _debug(*args, &block) _log(:debug, *args, &block) end |
#_error_exception(fmt) ⇒ Object
30 31 32 |
# File 'lib/listen/internals/logging.rb', line 30 def _error_exception(fmt) _log :error, _format_error(fmt) end |
#_format_error(fmt) ⇒ Object
26 27 28 |
# File 'lib/listen/internals/logging.rb', line 26 def _format_error(fmt) format(fmt, $ERROR_INFO, ", Backtrace: \n" + $ERROR_POSITION * "\n") end |
#_info(*args, &block) ⇒ Object
6 7 8 |
# File 'lib/listen/internals/logging.rb', line 6 def _info(*args, &block) _log(:info, *args, &block) end |
#_log(*args, &block) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/listen/internals/logging.rb', line 18 def _log(*args, &block) if block Celluloid::Logger.send(*args, block.call) else Celluloid::Logger.send(*args) end end |
#_warn(*args, &block) ⇒ Object
10 11 12 |
# File 'lib/listen/internals/logging.rb', line 10 def _warn(*args, &block) _log(:warn, *args, &block) end |