Class: EventHub::Components::LogFormatter
- Inherits:
-
Object
- Object
- EventHub::Components::LogFormatter
- Defined in:
- lib/eventhub/components/log_formatter.rb
Overview
format adaptation
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
3 4 5 6 |
# File 'lib/eventhub/components/log_formatter.rb', line 3 def call(severity, time, progname, msg) time_in_string = "#{time.strftime("%Y-%m-%d %H:%M:%S")}.#{"%04d" % (time.usec / 100)}" [time_in_string, Process.pid, severity, msg].join("\t") + "\n" end |