LogEntry
class LogEntry extends Message
An individual entry in a log.
Protobuf type Google\Logging\V2\LogEntry
Properties
protected | $payload |
Methods
No description
Required. The resource name of the log to which this log entry belongs:
"projects/[PROJECT_ID]/logs/[LOG_ID]"
"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
"folders/[FOLDER_ID]/logs/[LOG_ID]"
[LOG_ID]
must be URL-encoded within log_name
. Example:
"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
.
Required. The resource name of the log to which this log entry belongs:
"projects/[PROJECT_ID]/logs/[LOG_ID]"
"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
"folders/[FOLDER_ID]/logs/[LOG_ID]"
[LOG_ID]
must be URL-encoded within log_name
. Example:
"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
.
Required. The monitored resource associated with this log entry.
Required. The monitored resource associated with this log entry.
The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.
The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.
The log entry payload, represented as a Unicode string (UTF-8).
The log entry payload, represented as a Unicode string (UTF-8).
The log entry payload, represented as a structure that is expressed as a JSON object.
The log entry payload, represented as a structure that is expressed as a JSON object.
Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.
Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.
Output only. The time the log entry was received by Stackdriver Logging.
Output only. The time the log entry was received by Stackdriver Logging.
Optional. The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Optional. The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Optional. A unique identifier for the log entry. If you provide a value,
then Stackdriver Logging considers other log entries in the same project,
with the same timestamp
, and with the same insert_id
to be duplicates
which can be removed. If omitted in new log entries, then Stackdriver
Logging will insert its own unique identifier. The insert_id
is used
to order log entries that have the same timestamp
value.
Optional. A unique identifier for the log entry. If you provide a value,
then Stackdriver Logging considers other log entries in the same project,
with the same timestamp
, and with the same insert_id
to be duplicates
which can be removed. If omitted in new log entries, then Stackdriver
Logging will insert its own unique identifier. The insert_id
is used
to order log entries that have the same timestamp
value.
Optional. Information about the HTTP request associated with this log entry, if applicable.
Optional. Information about the HTTP request associated with this log entry, if applicable.
Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
Optional. Information about an operation associated with the log entry, if applicable.
Optional. Information about an operation associated with the log entry, if applicable.
Optional. Resource name of the trace associated with the log entry, if any.
Optional. Resource name of the trace associated with the log entry, if any.
Optional. Source code location information associated with the log entry, if any.
Optional. Source code location information associated with the log entry, if any.
No description
Details
at line 120
__construct()
at line 145
string
getLogName()
Required. The resource name of the log to which this log entry belongs:
"projects/[PROJECT_ID]/logs/[LOG_ID]"
"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
"folders/[FOLDER_ID]/logs/[LOG_ID]"
[LOG_ID]
must be URL-encoded within log_name
. Example:
"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
.
[LOG_ID]
must be less than 512 characters long and can only include the
following characters: upper and lower case alphanumeric characters,
forward-slash, underscore, hyphen, and period.
For backward compatibility, if log_name
begins with a forward-slash, such
as /projects/...
, then the log entry is ingested as usual but the
forward-slash is removed. Listing the log entry will not show the leading
slash and filtering for a log name with a leading slash will never return
any results.
Generated from protobuf field string log_name = 12;
at line 170
setLogName(string $var)
Required. The resource name of the log to which this log entry belongs:
"projects/[PROJECT_ID]/logs/[LOG_ID]"
"organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
"billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
"folders/[FOLDER_ID]/logs/[LOG_ID]"
[LOG_ID]
must be URL-encoded within log_name
. Example:
"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
.
[LOG_ID]
must be less than 512 characters long and can only include the
following characters: upper and lower case alphanumeric characters,
forward-slash, underscore, hyphen, and period.
For backward compatibility, if log_name
begins with a forward-slash, such
as /projects/...
, then the log entry is ingested as usual but the
forward-slash is removed. Listing the log entry will not show the leading
slash and filtering for a log name with a leading slash will never return
any results.
Generated from protobuf field string log_name = 12;
at line 185
MonitoredResource
getResource()
Required. The monitored resource associated with this log entry.
Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
Generated from protobuf field .google.api.MonitoredResource resource = 8;
at line 199
setResource(MonitoredResource $var)
Required. The monitored resource associated with this log entry.
Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
Generated from protobuf field .google.api.MonitoredResource resource = 8;
at line 213
Any
getProtoPayload()
The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.
Generated from protobuf field .google.protobuf.Any proto_payload = 2;
at line 226
setProtoPayload(Any $var)
The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.
Generated from protobuf field .google.protobuf.Any proto_payload = 2;
at line 238
string
getTextPayload()
The log entry payload, represented as a Unicode string (UTF-8).
Generated from protobuf field string text_payload = 3;
at line 249
setTextPayload(string $var)
The log entry payload, represented as a Unicode string (UTF-8).
Generated from protobuf field string text_payload = 3;
at line 262
Struct
getJsonPayload()
The log entry payload, represented as a structure that is expressed as a JSON object.
Generated from protobuf field .google.protobuf.Struct json_payload = 6;
at line 274
setJsonPayload(Struct $var)
The log entry payload, represented as a structure that is expressed as a JSON object.
Generated from protobuf field .google.protobuf.Struct json_payload = 6;
at line 290
Timestamp
getTimestamp()
Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.
Generated from protobuf field .google.protobuf.Timestamp timestamp = 9;
at line 305
setTimestamp(Timestamp $var)
Optional. The time the event described by the log entry occurred. If omitted in a new log entry, Stackdriver Logging will insert the time the log entry is received. Stackdriver Logging might reject log entries whose time stamps are more than a couple of hours in the future. Log entries with time stamps in the past are accepted.
Generated from protobuf field .google.protobuf.Timestamp timestamp = 9;
at line 317
Timestamp
getReceiveTimestamp()
Output only. The time the log entry was received by Stackdriver Logging.
Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24;
at line 328
setReceiveTimestamp(Timestamp $var)
Output only. The time the log entry was received by Stackdriver Logging.
Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24;
at line 341
int
getSeverity()
Optional. The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Generated from protobuf field .google.logging.type.LogSeverity severity = 10;
at line 353
setSeverity(int $var)
Optional. The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Generated from protobuf field .google.logging.type.LogSeverity severity = 10;
at line 370
string
getInsertId()
Optional. A unique identifier for the log entry. If you provide a value,
then Stackdriver Logging considers other log entries in the same project,
with the same timestamp
, and with the same insert_id
to be duplicates
which can be removed. If omitted in new log entries, then Stackdriver
Logging will insert its own unique identifier. The insert_id
is used
to order log entries that have the same timestamp
value.
Generated from protobuf field string insert_id = 4;
at line 386
setInsertId(string $var)
Optional. A unique identifier for the log entry. If you provide a value,
then Stackdriver Logging considers other log entries in the same project,
with the same timestamp
, and with the same insert_id
to be duplicates
which can be removed. If omitted in new log entries, then Stackdriver
Logging will insert its own unique identifier. The insert_id
is used
to order log entries that have the same timestamp
value.
Generated from protobuf field string insert_id = 4;
at line 399
HttpRequest
getHttpRequest()
Optional. Information about the HTTP request associated with this log entry, if applicable.
Generated from protobuf field .google.logging.type.HttpRequest http_request = 7;
at line 411
setHttpRequest(HttpRequest $var)
Optional. Information about the HTTP request associated with this log entry, if applicable.
Generated from protobuf field .google.logging.type.HttpRequest http_request = 7;
at line 424
RepeatedField
getLabels()
Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
Generated from protobuf field map<string, string> labels = 11;
at line 436
setLabels(array|RepeatedField $var)
Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
Generated from protobuf field map<string, string> labels = 11;
at line 449
LogEntryOperation
getOperation()
Optional. Information about an operation associated with the log entry, if applicable.
Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15;
at line 461
setOperation(LogEntryOperation $var)
Optional. Information about an operation associated with the log entry, if applicable.
Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15;
at line 476
string
getTrace()
Optional. Resource name of the trace associated with the log entry, if any.
If it contains a relative resource name, the name is assumed to be relative
to //tracing.googleapis.com
. Example:
projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
Generated from protobuf field string trace = 22;
at line 490
setTrace(string $var)
Optional. Resource name of the trace associated with the log entry, if any.
If it contains a relative resource name, the name is assumed to be relative
to //tracing.googleapis.com
. Example:
projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
Generated from protobuf field string trace = 22;
at line 503
LogEntrySourceLocation
getSourceLocation()
Optional. Source code location information associated with the log entry, if any.
Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23;
at line 515
setSourceLocation(LogEntrySourceLocation $var)
Optional. Source code location information associated with the log entry, if any.
Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23;