Class: Loga::Event

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Event

Returns a new instance of Event.



5
6
7
8
9
10
11
# File 'lib/loga/event.rb', line 5

def initialize(opts = {})
  @data      = opts[:data]
  @exception = opts[:exception]
  @message   = safe_encode(opts[:message])
  @timestamp = opts[:timestamp]
  @type      = opts[:type]
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/loga/event.rb', line 3

def data
  @data
end

#exceptionObject

Returns the value of attribute exception.



3
4
5
# File 'lib/loga/event.rb', line 3

def exception
  @exception
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/loga/event.rb', line 3

def message
  @message
end

#timestampObject

Returns the value of attribute timestamp.



3
4
5
# File 'lib/loga/event.rb', line 3

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/loga/event.rb', line 3

def type
  @type
end