Class: Tansu::Formatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Tansu::Formatter
- Defined in:
- lib/tansu/formatter.rb
Constant Summary collapse
- FORMAT =
%{%s [%s] %s : %s\n}
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/tansu/formatter.rb', line 5 def call(severity, time, progname, msg) level = severity[0] timef = time.strftime("%Y-%m-%d %H:%M:%S %z") name = progname || '-' FORMAT % [level, timef, name, msg] end |