Class: TTY::Logger::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/tty/logger/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message, fields = {},  = {})
  @message = message
  @fields = fields
  @metadata = 
  @backtrace = []

  evaluate_message
end

Instance Attribute Details

#backtraceObject (readonly)

Returns the value of attribute backtrace.



12
13
14
# File 'lib/tty/logger/event.rb', line 12

def backtrace
  @backtrace
end

#fieldsObject (readonly)

Returns the value of attribute fields.



8
9
10
# File 'lib/tty/logger/event.rb', line 8

def fields
  @fields
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/tty/logger/event.rb', line 6

def message
  @message
end

#metadataObject (readonly)

Returns the value of attribute metadata.



10
11
12
# File 'lib/tty/logger/event.rb', line 10

def 
  @metadata
end