Reference documentation and code samples for the Google Cloud Service Control V1 Client class LogEntry.
An individual log entry.
Generated from protobuf message google.api.servicecontrol.v1.LogEntry
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Required. The log to which this log entry belongs. Examples: |
↳ timestamp |
Google\Protobuf\Timestamp
The time the event described by the log entry occurred. If omitted, defaults to operation start time. |
↳ severity |
int
The severity of the log entry. The default value is |
↳ http_request |
Google\Cloud\ServiceControl\V1\HttpRequest
Optional. Information about the HTTP request associated with this log entry, if applicable. |
↳ trace |
string
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 |
↳ insert_id |
string
A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. |
↳ labels |
array|Google\Protobuf\Internal\MapField
A set of user-defined (key, value) data that provides additional information about the log entry. |
↳ proto_payload |
Google\Protobuf\Any
The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. |
↳ text_payload |
string
The log entry payload, represented as a Unicode string (UTF-8). |
↳ struct_payload |
Google\Protobuf\Struct
The log entry payload, represented as a structure that is expressed as a JSON object. |
↳ operation |
Google\Cloud\ServiceControl\V1\LogEntryOperation
Optional. Information about an operation associated with the log entry, if applicable. |
↳ source_location |
Google\Cloud\ServiceControl\V1\LogEntrySourceLocation
Optional. Source code location information associated with the log entry, if any. |
getName
Required. The log to which this log entry belongs. Examples: "syslog"
,
"book_log"
.
Returns | |
---|---|
Type | Description |
string |
setName
Required. The log to which this log entry belongs. Examples: "syslog"
,
"book_log"
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTimestamp
The time the event described by the log entry occurred. If omitted, defaults to operation start time.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasTimestamp
clearTimestamp
setTimestamp
The time the event described by the log entry occurred. If omitted, defaults to operation start time.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getSeverity
The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Returns | |
---|---|
Type | Description |
int |
setSeverity
The severity of the log entry. The default value is
LogSeverity.DEFAULT
.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getHttpRequest
Optional. Information about the HTTP request associated with this log entry, if applicable.
Returns | |
---|---|
Type | Description |
Google\Cloud\ServiceControl\V1\HttpRequest|null |
hasHttpRequest
clearHttpRequest
setHttpRequest
Optional. Information about the HTTP request associated with this log entry, if applicable.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ServiceControl\V1\HttpRequest
|
Returns | |
---|---|
Type | Description |
$this |
getTrace
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
Returns | |
---|---|
Type | Description |
string |
setTrace
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
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getInsertId
A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.
Returns | |
---|---|
Type | Description |
string |
setInsertId
A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLabels
A set of user-defined (key, value) data that provides additional information about the log entry.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setLabels
A set of user-defined (key, value) data that provides additional information about the log entry.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getProtoPayload
The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Any|null |
hasProtoPayload
setProtoPayload
The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Any
|
Returns | |
---|---|
Type | Description |
$this |
getTextPayload
The log entry payload, represented as a Unicode string (UTF-8).
Returns | |
---|---|
Type | Description |
string |
hasTextPayload
setTextPayload
The log entry payload, represented as a Unicode string (UTF-8).
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getStructPayload
The log entry payload, represented as a structure that is expressed as a JSON object.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Struct|null |
hasStructPayload
setStructPayload
The log entry payload, represented as a structure that is expressed as a JSON object.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Struct
|
Returns | |
---|---|
Type | Description |
$this |
getOperation
Optional. Information about an operation associated with the log entry, if applicable.
Returns | |
---|---|
Type | Description |
Google\Cloud\ServiceControl\V1\LogEntryOperation|null |
hasOperation
clearOperation
setOperation
Optional. Information about an operation associated with the log entry, if applicable.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ServiceControl\V1\LogEntryOperation
|
Returns | |
---|---|
Type | Description |
$this |
getSourceLocation
Optional. Source code location information associated with the log entry, if any.
Returns | |
---|---|
Type | Description |
Google\Cloud\ServiceControl\V1\LogEntrySourceLocation|null |
hasSourceLocation
clearSourceLocation
setSourceLocation
Optional. Source code location information associated with the log entry, if any.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ServiceControl\V1\LogEntrySourceLocation
|
Returns | |
---|---|
Type | Description |
$this |
getPayload
Returns | |
---|---|
Type | Description |
string |