Class: Faktory::Logging::Pretty
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Faktory::Logging::Pretty
- Defined in:
- lib/faktory/logging.rb
Direct Known Subclasses
Constant Summary collapse
- SPACE =
" "
Instance Method Summary collapse
-
#call(severity, time, program_name, message) ⇒ Object
Provide a call() method that returns the formatted message.
- #context ⇒ Object
Instance Method Details
#call(severity, time, program_name, message) ⇒ Object
Provide a call() method that returns the formatted message.
13 14 15 |
# File 'lib/faktory/logging.rb', line 13 def call(severity, time, program_name, ) "#{time.utc.iso8601(3)} #{::Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{severity}: #{}\n" end |
#context ⇒ Object
17 18 19 20 |
# File 'lib/faktory/logging.rb', line 17 def context c = Thread.current[:faktory_context] " #{c.join(SPACE)}" if c && c.any? end |