LogEntry class final
An individual entry in a log.
- Inheritance
-
- Object
- ProtoMessage
- LogEntry
Constructors
-
LogEntry({required String logName, required MonitoredResource? resource, Any? protoPayload, String? textPayload, Struct? jsonPayload, Timestamp? timestamp, Timestamp? receiveTimestamp, LogSeverity severity = logging_type.LogSeverity.$default, String insertId = '', HttpRequest? httpRequest, Map<
String, String> labels = const {}, LogEntryOperation? operation, String trace = '', String spanId = '', bool traceSampled = false, LogEntrySourceLocation? sourceLocation, LogSplit? split}) -
LogEntry.fromJson(Map<
String, dynamic> json) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpRequest → HttpRequest?
-
Optional. Information about the HTTP request associated with this log
entry, if applicable.
final
- insertId → String
-
Optional. A unique identifier for the log entry. If you provide a value,
then Logging considers other log entries in the same project, with the same
timestamp, and with the sameinsert_idto be duplicates which are removed in a single query result. However, there are no guarantees of de-duplication in the export of logs.final - jsonPayload → Struct?
-
The log entry payload, represented as a structure that is
expressed as a JSON object.
final
-
labels
→ Map<
String, String> -
Optional. A map of key, value pairs that provides additional information
about the log entry. The labels can be user-defined or system-defined.
final
- logName → String
-
Required. The resource name of the log to which this log entry belongs:
final
- operation → LogEntryOperation?
-
Optional. Information about an operation associated with the log entry, if
applicable.
final
- protoPayload → Any?
-
The log entry payload, represented as a protocol buffer. Some Google
Cloud Platform services use this field for their log entry payloads.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - receiveTimestamp → Timestamp?
-
Output only. The time the log entry was received by Logging.
final
- resource → MonitoredResource?
-
Required. The monitored resource that produced this log entry.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → LogSeverity
-
Optional. The severity of the log entry. The default value is
LogSeverity.DEFAULT.final - sourceLocation → LogEntrySourceLocation?
-
Optional. Source code location information associated with the log entry,
if any.
final
- spanId → String
-
Optional. The ID of the Cloud Trace span
associated with the current operation in which the log is being written.
For example, if a span has the REST resource name of
"projects/some-project/traces/some-trace/spans/some-span-id", then the
span_idfield is "some-span-id".final - split → LogSplit?
-
Optional. Information indicating this LogEntry is part of a sequence of
multiple log entries split from a single LogEntry.
final
- textPayload → String?
-
The log entry payload, represented as a Unicode string (UTF-8).
final
- timestamp → Timestamp?
-
Optional. The time the event described by the log entry occurred. This time
is used to compute the log entry's age and to enforce the logs retention
period. If this field is omitted in a new log entry, then Logging assigns
it the current time. Timestamps have nanosecond accuracy, but trailing
zeros in the fractional seconds might be omitted when the timestamp is
displayed.
final
- trace → String
-
Optional. The REST resource name of the trace being written to
Cloud Trace in
association with this log entry. For example, if your trace data is stored
in the Cloud project "my-trace-project" and if the service that is creating
the log entry receives a trace header that includes the trace ID "12345",
then the service should use "projects/my-tracing-project/traces/12345".
final
- traceSampled → bool
-
Optional. The sampling decision of the trace associated with the log entry.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String