Class: Thrifty::Logger::Entry
- Inherits:
-
Struct
- Object
- Struct
- Thrifty::Logger::Entry
- Defined in:
- lib/thrifty/logger/entry.rb
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
-
#message ⇒ Object
Returns the value of attribute message.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level
2 3 4 |
# File 'lib/thrifty/logger/entry.rb', line 2 def level @level end |
#message ⇒ Object
Returns the value of attribute message
2 3 4 |
# File 'lib/thrifty/logger/entry.rb', line 2 def @message end |
#payload ⇒ Object
Returns the value of attribute payload
2 3 4 |
# File 'lib/thrifty/logger/entry.rb', line 2 def payload @payload end |
#scope ⇒ Object
Returns the value of attribute scope
2 3 4 |
# File 'lib/thrifty/logger/entry.rb', line 2 def scope @scope end |
#time ⇒ Object
Returns the value of attribute time
2 3 4 |
# File 'lib/thrifty/logger/entry.rb', line 2 def time @time end |
Instance Method Details
#to_h ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/thrifty/logger/entry.rb', line 3 def to_h { level: level || :info, time: time || Time.now, message: , scope: scope, }.merge!(payload || {}) end |