Class: RabbitmqClient::TextFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- RabbitmqClient::TextFormatter
- Defined in:
- lib/rabbitmq_client/text_formatter.rb
Overview
Formatter for text log messages
Instance Method Summary collapse
- #call(severity, time, progname, msg) ⇒ Object
-
#initialize ⇒ TextFormatter
constructor
A new instance of TextFormatter.
Constructor Details
#initialize ⇒ TextFormatter
Returns a new instance of TextFormatter.
9 10 11 12 13 14 |
# File 'lib/rabbitmq_client/text_formatter.rb', line 9 def initialize @datetime_format = nil @severity_text = nil @tags = nil super end |
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rabbitmq_client/text_formatter.rb', line 16 def call(severity, time, progname, msg) create_instance_vars(severity) format(Format, @severity_text[0], format_datetime(time), $PID, @severity_text, progname, "#{@tags}#{msg2str(msg)}") end |