Class: GrayLogger::Message
- Inherits:
-
Object
- Object
- GrayLogger::Message
- Includes:
- Support
- Defined in:
- lib/gray_logger/message.rb
Constant Summary collapse
- RESERVED_KEYS =
%( short_message full_message version host timestamp level facility line file )
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#message_hash ⇒ Object
readonly
Returns the value of attribute message_hash.
Instance Method Summary collapse
-
#initialize(message_hash = {}) ⇒ Message
constructor
A new instance of Message.
- #to_hash ⇒ Object
Methods included from Support
Constructor Details
#initialize(message_hash = {}) ⇒ Message
Returns a new instance of Message.
9 10 11 12 |
# File 'lib/gray_logger/message.rb', line 9 def initialize(={}) @message_hash = @message = {} end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/gray_logger/message.rb', line 7 def @message end |
#message_hash ⇒ Object (readonly)
Returns the value of attribute message_hash.
7 8 9 |
# File 'lib/gray_logger/message.rb', line 7 def @message_hash end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 |
# File 'lib/gray_logger/message.rb', line 14 def to_hash prepare_hash ensure_necessary_keys_are_present symbolize_keys(@message) end |