Class: Creeper::Logging::Pretty
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Creeper::Logging::Pretty
- Defined in:
- lib/creeper/logging.rb
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.
9 10 11 |
# File 'lib/creeper/logging.rb', line 9 def call(severity, time, program_name, ) "#{time.utc.iso8601} #{Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{severity}: #{}\n" end |
#context ⇒ Object
13 14 15 16 |
# File 'lib/creeper/logging.rb', line 13 def context c = Thread.current[:creeper_context] c ? " #{c}" : '' end |