Class: Brogger::TimestampFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Brogger::TimestampFormatter
- Defined in:
- lib/brogger/timestamp_formatter.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
4 5 6 |
# File 'lib/brogger/timestamp_formatter.rb', line 4 def call(severity, time, progname, msg) format % [ time.utc.iso8601, progname, $$, severity, msg2str(msg) ] end |
#format ⇒ Object
9 10 11 |
# File 'lib/brogger/timestamp_formatter.rb', line 9 def format "%s [%s.%d] %5s: %s\n" end |
#msg2str ⇒ Object
14 15 16 |
# File 'lib/brogger/timestamp_formatter.rb', line 14 def msg2str(*) super.strip end |