Module: Restify::Logging
- Included in:
- Adapter::PooledEM, Adapter::PooledEM::Pool, Adapter::Typhoeus
- Defined in:
- lib/restify/logging.rb
Instance Method Summary collapse
- #_fmt(**kwargs) ⇒ Object
- #_log_prefix ⇒ Object
- #debug(message = nil, tag: nil, **kwargs) ⇒ Object
- #logger ⇒ Object
Instance Method Details
#_fmt(**kwargs) ⇒ Object
26 27 28 |
# File 'lib/restify/logging.rb', line 26 def _fmt(**kwargs) kwargs.each.map {|k, v| "#{k}=#{v}" }.join(' ') end |
#_log_prefix ⇒ Object
22 23 24 |
# File 'lib/restify/logging.rb', line 22 def _log_prefix nil end |
#debug(message = nil, tag: nil, **kwargs) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/restify/logging.rb', line 11 def debug( = nil, tag: nil, **kwargs) logger.debug do [ _log_prefix, *Array(tag), , _fmt(**kwargs) ].map(&:to_s).reject(&:empty?).join(' ') end end |
#logger ⇒ Object
7 8 9 |
# File 'lib/restify/logging.rb', line 7 def logger @logger ||= ::Logging.logger[self] end |