# Class LogEntry (1.20.0)

1.20.0 (latest) 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.1 1.12.3 1.11.1 1.10.0 1.9.1 1.8.1 1.7.1 1.6.0 1.5.3 1.4.2 1.3.1 1.2.1 1.1.0 1.0.3 0.3.0 0.2.0 0.1.0

    LogEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

An individual log entry.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`. |
| `timestamp` | `google.protobuf.timestamp_pb2.Timestamp` The time the event described by the log entry occurred. If omitted, defaults to operation start time. |
| `severity` | `google.logging.type.log_severity_pb2.LogSeverity` The severity of the log entry. The default value is `LogSeverity.DEFAULT`. |
| `http_request` | `https://docs.cloud.google.com/python/docs/reference/servicecontrol/latest/google.cloud.servicecontrol_v1.types.HttpRequest` Optional. Information about the HTTP request associated with this log entry, if applicable. |
| `trace` | `str` Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` |
| `insert_id` | `str` A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. |
| `labels` | `MutableMapping[str, str]` A set of user-defined (key, value) data that provides additional information about the log entry. |
| `proto_payload` | `google.protobuf.any_pb2.Any` The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. This field is a member of `oneof`_ `payload`. |
| `text_payload` | `str` The log entry payload, represented as a Unicode string (UTF-8). This field is a member of `oneof`_ `payload`. |
| `struct_payload` | `google.protobuf.struct_pb2.Struct` The log entry payload, represented as a structure that is expressed as a JSON object. This field is a member of `oneof`_ `payload`. |
| `operation` | `https://docs.cloud.google.com/python/docs/reference/servicecontrol/latest/google.cloud.servicecontrol_v1.types.LogEntryOperation` Optional. Information about an operation associated with the log entry, if applicable. |
| `source_location` | `https://docs.cloud.google.com/python/docs/reference/servicecontrol/latest/google.cloud.servicecontrol_v1.types.LogEntrySourceLocation` Optional. Source code location information associated with the log entry, if any. |

## Classes

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |