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.
10 11 12 13 |
# File 'lib/gray_logger/message.rb', line 10 def initialize(={}) @message_hash = @message = {} end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/gray_logger/message.rb', line 8 def @message end |
#message_hash ⇒ Object (readonly)
Returns the value of attribute message_hash.
8 9 10 |
# File 'lib/gray_logger/message.rb', line 8 def @message_hash end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 |
# File 'lib/gray_logger/message.rb', line 15 def to_hash prepare_hash ensure_necessary_keys_are_present symbolize_keys(@message) end |