Class: QAT::Logger::RemoteOutputter::Message
- Inherits:
-
Object
- Object
- QAT::Logger::RemoteOutputter::Message
- Extended by:
- Forwardable
- Defined in:
- lib/qat/logger/outputter/remote/message.rb
Overview
This class is a message holder for the RemoteOutputter
Constant Summary collapse
- LINE_PARSER =
Regex used to extract file and line information from log events
/^(.*):(\d+)(:in \`(.*)')?/
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#formatter ⇒ Object
readonly
Returns the value of attribute formatter.
-
#log_event ⇒ Object
readonly
Returns the value of attribute log_event.
Instance Method Summary collapse
-
#initialize(log_event, level, level_name, formatter) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(log_event, level, level_name, formatter) ⇒ Message
Returns a new instance of Message.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/qat/logger/outputter/remote/message.rb', line 19 def initialize(log_event, level, level_name, formatter) @log_event = log_event @content = {} @content[:level] = level @content['_level_name'] = level_name @content["_logger"] = log_event.fullname @content["_log_timestamp"] = Time.now.iso8601(3) @formatter = formatter end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
12 13 14 |
# File 'lib/qat/logger/outputter/remote/message.rb', line 12 def content @content end |
#formatter ⇒ Object (readonly)
Returns the value of attribute formatter.
12 13 14 |
# File 'lib/qat/logger/outputter/remote/message.rb', line 12 def formatter @formatter end |
#log_event ⇒ Object (readonly)
Returns the value of attribute log_event.
12 13 14 |
# File 'lib/qat/logger/outputter/remote/message.rb', line 12 def log_event @log_event end |