Class: LogEvents
- Inherits:
-
Object
- Object
- LogEvents
- Defined in:
- lib/fluent/dto/logEvents.rb
Overview
Copyright © 2021, 2024 Oracle and/or its affiliates. The Universal Permissive License (UPL), Version 1.0 as shown at oss.oracle.com/licenses/upl/
Instance Attribute Summary collapse
-
#entityId ⇒ Object
Returns the value of attribute entityId.
-
#entityType ⇒ Object
Returns the value of attribute entityType.
-
#logPath ⇒ Object
Returns the value of attribute logPath.
-
#logRecords ⇒ Object
Returns the value of attribute logRecords.
-
#logSourceName ⇒ Object
Returns the value of attribute logSourceName.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#timezone ⇒ Object
Returns the value of attribute timezone.
Instance Method Summary collapse
-
#initialize(lrpe_key, fluentd_records) ⇒ LogEvents
constructor
A new instance of LogEvents.
- #to_hash ⇒ Object
Constructor Details
#initialize(lrpe_key, fluentd_records) ⇒ LogEvents
Returns a new instance of LogEvents.
6 7 8 9 10 11 |
# File 'lib/fluent/dto/logEvents.rb', line 6 def initialize(lrpe_key, fluentd_records) @metadata, @entityId, @entityType, @logSourceName, @logPath, @timezone = lrpe_key @logRecords = fluentd_records.map{ |record| record['message'] } end |
Instance Attribute Details
#entityId ⇒ Object
Returns the value of attribute entityId.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def entityId @entityId end |
#entityType ⇒ Object
Returns the value of attribute entityType.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def entityType @entityType end |
#logPath ⇒ Object
Returns the value of attribute logPath.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def logPath @logPath end |
#logRecords ⇒ Object
Returns the value of attribute logRecords.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def logRecords @logRecords end |
#logSourceName ⇒ Object
Returns the value of attribute logSourceName.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def logSourceName @logSourceName end |
#metadata ⇒ Object
Returns the value of attribute metadata.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def @metadata end |
#timezone ⇒ Object
Returns the value of attribute timezone.
5 6 7 |
# File 'lib/fluent/dto/logEvents.rb', line 5 def timezone @timezone end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fluent/dto/logEvents.rb', line 13 def to_hash { metadata: @metadata, entityId: @entityId, entityType: @entityType, logSourceName: @logSourceName, logPath: @logPath, logRecords: @logRecords, timezone:@timezone }.compact end |