class Google::Apis::LoggingV2beta1::LogEntry
An individual entry in a log.
Attributes
A common proto for logging HTTP requests. Corresponds to the JSON property `httpRequest` @return [Google::Apis::LoggingV2beta1::HttpRequest]
Optional. 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. If omitted, Cloud Logging will generate a unique ID for this log entry. Corresponds to the JSON property `insertId` @return [String]
The log entry payload, represented as a structure that is expressed as a JSON object. Corresponds to the JSON property `jsonPayload` @return [Hash<String,Object>]
Optional. A set of user-defined (key, value) data that provides additional information about the log entry. Corresponds to the JSON property `labels` @return [Hash<String,String>]
Required. The resource name of the log to which this log entry belongs. The format of the name is `“projects/ /logs/”`. Examples: `“projects/my-projectid/logs/syslog”`, `“projects/ 1234567890/logs/library.googleapis.com%2Fbook_log”`. The log ID part of resource name must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters: [A-Za-z0-9] ; and punctuation characters: forward-slash, underscore, hyphen, and period. Forward-slash (`/`) characters in the log ID must be URL-encoded. Corresponds to the JSON property `logName` @return [String]
Additional information about a potentially long-running operation with which a log entry is associated. Corresponds to the JSON property `operation` @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
The log entry payload, represented as a protocol buffer. You can only use ` protoPayload` values that belong to a set of approved types. Corresponds to the JSON property `protoPayload` @return [Hash<String,Object>]
An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `“gce_instance”` has labels `“instance_id”` and `“zone”`: ` “type”: “gce_instance”, “labels”: ` “instance_id”: “my- instance”, “zone”: “us-central1-a” “ Corresponds to the JSON property `resource` @return [Google::Apis::LoggingV2beta1::MonitoredResource]
Optional. The severity of the log entry. The default value is `LogSeverity. DEFAULT`. Corresponds to the JSON property `severity` @return [String]
The log entry payload, represented as a Unicode string (UTF-8). Corresponds to the JSON property `textPayload` @return [String]
Optional. The time the event described by the log entry occurred. If omitted, Cloud Logging will use the time the log entry is written. Corresponds to the JSON property `timestamp` @return [String]
Public Class Methods
# File generated/google/apis/logging_v2beta1/classes.rb, line 226 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/logging_v2beta1/classes.rb, line 231 def update!(**args) @log_name = args[:log_name] if args.key?(:log_name) @resource = args[:resource] if args.key?(:resource) @proto_payload = args[:proto_payload] if args.key?(:proto_payload) @text_payload = args[:text_payload] if args.key?(:text_payload) @json_payload = args[:json_payload] if args.key?(:json_payload) @timestamp = args[:timestamp] if args.key?(:timestamp) @severity = args[:severity] if args.key?(:severity) @insert_id = args[:insert_id] if args.key?(:insert_id) @http_request = args[:http_request] if args.key?(:http_request) @labels = args[:labels] if args.key?(:labels) @operation = args[:operation] if args.key?(:operation) end