프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$connection | Represents a connection to Stackdriver Logging. |
메소드 | 설명 | |
---|---|---|
__construct ( Google\Cloud\Logging\Connection\ConnectionInterface $connection, string $name, string $projectId, array $resource = null, array $labels = null ) | ||
delete ( array $options = [] ) | Deletes this log and all its log entries. The log will reappear if it receives new entries. | |
entries ( array $options = [] ) : Generator |
Fetches entries scoped to the selected log. | |
entry ( array | string $data, array $options = [] ) : |
Creates an entry which which can be written to a log. In order to write the entry to the log please use {@see Google\Cloud\Logging\Logger::write()} or {@see Google\Cloud\Logging\Logger::writeBatch()}. | |
getLogLevelMap ( ) | Returns the log level map. | |
write ( array | string | |
Write a single entry to the log. | |
writeBatch ( array $entries, array $options = [] ) | Write a set of entries to the log. |
public __construct ( Google\Cloud\Logging\Connection\ConnectionInterface $connection, string $name, string $projectId, array $resource = null, array $labels = null ) | ||
$connection | Google\Cloud\Logging\Connection\ConnectionInterface | Represents a connection to Stackdriver Logging. |
$name | string | The name of the log to write entries to. |
$projectId | string | The project's ID. |
$resource | array | [optional] The [monitored resource](https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/MonitoredResource) to associate log entries with. **Defaults to** type global. |
$labels | array | [optional] A set of user-defined (key, value) data that provides additional information about the log entries. |
public entries ( array $options = [] ) : Generator |
||
$options | array | [optional] { Configuration options. @type string $filter An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters). @type string $orderBy How the results should be sorted. Presently, the only permitted values are `timestamp asc` and `timestamp desc`. **Defaults to** `"timestamp asc"`. @type int $pageSize The maximum number of results to return per request. } |
리턴 | Generator |
public entry ( array | string $data, array $options = [] ) : |
||
$data | array | string | The data to log. When providing a string the data will be stored as a `textPayload` type. When providing an array the data will be stored as a `jsonPayload` type. |
$options | array | [optional] { Configuration options. @type array $resource The [monitored resource](https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/MonitoredResource) to associate this log entry with. **Defaults to** type global. @type array $httpRequest Information about the HTTP request associated with this log entry, if applicable. Please see [the API docs](https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry#httprequest) for more information. @type array $labels A set of user-defined (key, value) data that provides additional information about the log entry. @type array $operation Additional information about a potentially long-running operation with which a log entry is associated. Please see [the API docs](https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry#logentryoperation) for more information. @type string|int $severity The severity of the log entry. **Defaults to** `"DEFAULT"`. } |
리턴 |
public write ( array | string | |
||
$entry | array | string | |
The entry to write to the log. |
$options | array | [optional] Please see {@see \Google\Cloud\Logging\Logger::entry()} to see the options that can be applied to a log entry. Please note that if the provided entry is of type `Entry` these options will overwrite those that may already be set on the instance. |
public writeBatch ( array $entries, array $options = [] ) | ||
$entries | array | Entries to write to the log. |
$options | array | [optional] Configuration Options. |