Class: MotherBrain::Logging::BasicFormat
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- MotherBrain::Logging::BasicFormat
- Defined in:
- lib/mb/logging/basic_format.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, datetime, progname, msg) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/mb/logging/basic_format.rb', line 4 def call(severity, datetime, progname, msg) = msg.to_s if match = .match(/NODE\[.+?\]/) format_matched_lines match, else "[#{datetime.utc.iso8601}] PID[#{Process.pid}] TID[#{Thread.current.object_id.to_s(36)}] #{severity}: #{}\n" end end |