Class: Google::Apis::LoggingV1beta3::LogEntry

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb

Overview

An individual entry in a log.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogEntry

Returns a new instance of LogEntry.



181
182
183
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 181

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#http_requestGoogle::Apis::LoggingV1beta3::HttpRequest

A common proto for logging HTTP requests. Corresponds to the JSON property httpRequest



179
180
181
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 179

def http_request
  @http_request
end

#insert_idString

A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same log with the same ID as duplicates which can be removed. Corresponds to the JSON property insertId

Returns:

  • (String)


168
169
170
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 168

def insert_id
  @insert_id
end

#logString

The log to which this entry belongs. When a log entry is ingested, the value of this field is set by the logging system. Corresponds to the JSON property log

Returns:

  • (String)


174
175
176
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 174

def log
  @log
end

#metadataGoogle::Apis::LoggingV1beta3::LogEntryMetadata

Additional data that is associated with a log entry, set by the service creating the log entry. Corresponds to the JSON property metadata



143
144
145
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 143

def 
  @metadata
end

#proto_payloadHash<String,Object>

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. You can only pass protoPayload values that belong to a set of approved types. Corresponds to the JSON property protoPayload

Returns:

  • (Hash<String,Object>)


150
151
152
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 150

def proto_payload
  @proto_payload
end

#struct_payloadHash<String,Object>

The log entry payload, represented as a structure that is expressed as a JSON object. Corresponds to the JSON property structPayload

Returns:

  • (Hash<String,Object>)


161
162
163
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 161

def struct_payload
  @struct_payload
end

#text_payloadString

The log entry payload, represented as a Unicode string (UTF-8). Corresponds to the JSON property textPayload

Returns:

  • (String)


155
156
157
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 155

def text_payload
  @text_payload
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



186
187
188
189
190
191
192
193
194
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 186

def update!(**args)
  @metadata = args[:metadata] unless args[:metadata].nil?
  @proto_payload = args[:proto_payload] unless args[:proto_payload].nil?
  @text_payload = args[:text_payload] unless args[:text_payload].nil?
  @struct_payload = args[:struct_payload] unless args[:struct_payload].nil?
  @insert_id = args[:insert_id] unless args[:insert_id].nil?
  @log = args[:log] unless args[:log].nil?
  @http_request = args[:http_request] unless args[:http_request].nil?
end