public log ( string | integer $level, string $message, array $context = [] ) | ||
$level | string | integer | The severity of the log entry. |
$message | string | The message to log. |
$context | array | { Context is an associative array which can include placeholders to be used in the `$message`. Placeholders must be delimited with a single opening brace `{` and a single closing brace `}`. The context will be added as additional information on the `jsonPayload`. Please note that the key `stackdriverOptions` is reserved for logging Google Stackdriver specific data. @type array $stackdriverOptions['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 $stackdriverOptions['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 $stackdriverOptions['labels'] A set of user-defined (key, value) data that provides additional information about the log entry. @type array $stackdriverOptions['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. } |