Class: TTY::Logger::Event
- Inherits:
-
Object
- Object
- TTY::Logger::Event
- Defined in:
- lib/tty/logger/event.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(message, fields = {}, metadata = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(message, fields = {}, metadata = {}) ⇒ Event
Returns a new instance of Event.
14 15 16 17 18 19 20 21 |
# File 'lib/tty/logger/event.rb', line 14 def initialize(, fields = {}, = {}) @message = @fields = fields @metadata = @backtrace = [] end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
12 13 14 |
# File 'lib/tty/logger/event.rb', line 12 def backtrace @backtrace end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
8 9 10 |
# File 'lib/tty/logger/event.rb', line 8 def fields @fields end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/tty/logger/event.rb', line 6 def @message end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/tty/logger/event.rb', line 10 def @metadata end |