Class: Thrifty::Logger::ExceptionEntry
- Inherits:
-
Struct
- Object
- Struct
- Thrifty::Logger::ExceptionEntry
- Defined in:
- lib/thrifty/logger/entry.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#level ⇒ Object
Returns the value of attribute level.
-
#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
#exception ⇒ Object
Returns the value of attribute exception
13 14 15 |
# File 'lib/thrifty/logger/entry.rb', line 13 def exception @exception end |
#level ⇒ Object
Returns the value of attribute level
13 14 15 |
# File 'lib/thrifty/logger/entry.rb', line 13 def level @level end |
#payload ⇒ Object
Returns the value of attribute payload
13 14 15 |
# File 'lib/thrifty/logger/entry.rb', line 13 def payload @payload end |
#scope ⇒ Object
Returns the value of attribute scope
13 14 15 |
# File 'lib/thrifty/logger/entry.rb', line 13 def scope @scope end |
#time ⇒ Object
Returns the value of attribute time
13 14 15 |
# File 'lib/thrifty/logger/entry.rb', line 13 def time @time end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/thrifty/logger/entry.rb', line 14 def to_h { level: level || :error, time: time || Time.now, message: exception., scope: scope, exception: exception.class.to_s, }.merge!(payload || {}) end |