Class: Triglav::Agent::LogFormatter
- Inherits:
-
Object
- Object
- Triglav::Agent::LogFormatter
- Defined in:
- lib/triglav/agent/logger.rb
Constant Summary
- FORMAT =
"%s [%s] %s %s\n"
Instance Method Summary collapse
- #call(severity, time, progname, msg) ⇒ Object
-
#initialize(opts = {}) ⇒ LogFormatter
constructor
A new instance of LogFormatter.
Constructor Details
#initialize(opts = {}) ⇒ LogFormatter
Returns a new instance of LogFormatter
24 25 |
# File 'lib/triglav/agent/logger.rb', line 24 def initialize(opts={}) end |
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
27 28 29 |
# File 'lib/triglav/agent/logger.rb', line 27 def call(severity, time, progname, msg) FORMAT % [format_datetime(time), severity, format_pid, (msg)] end |