google/appengine/api/log/LogService.php
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\google\appengine\api\log\LogService
Application logs are added to a the current request log by calling
- Link
-
syslog(int $priority,
string $message). The $priority used when creating the application log is
translated into a different scale of severity used by the LogService.
Application logs have a level in order of increasing severity:
syslog $priority GAE severity LOG_DEBUG LogService::LEVEL_DEBUG LOG_INFO LogService::LEVEL_INFO LOG_NOTICE LogService::LEVEL_INFO LOG_WARNING LogService::LEVEL_WARNING LOG_ERR LogService::LEVEL_ERROR LOG_CRIT LogService::LEVEL_CRITICAL LOG_ALERT LogService::LEVEL_CRITICAL LOG_EMERG LogService::LEVEL_CRITICAL When fetching application logs or filtering request logs by severity use the values in the right hand column.
Constants
Methods
fetch
(array $options = array())
: \google\appengine\api\log\Iterator
Get request logs matching the given options in reverse chronological order of request end time.
Name | Type | Description |
---|---|---|
$options | array |
Optional associateive arrary of filters and modifiers from following:
|
Type | Description |
---|---|
\google\appengine\api\log\Iterator | The matching <code>RequestLog</code> items. |
fetchById
(mixed $request_ids, boolean $include_app_logs = true)
:
\google\appengine\api\log\RequestLog[]
Get request logs for the given request log ids and optionally include the application logs addded during each request.
Request log ids that are not found are ignored so the returned array may have fewer items than
$request_ids
.
Name | Type | Description |
---|---|---|
$request_ids | mixed |
A string request id or an array of string request
ids obtained from
|
$include_app_logs | boolean |
Should applicaiton logs be included in the fetched request logs. Defaults to true - application logs are included. |
Type | Description |
---|---|
\google\appengine\api\log\RequestLog[] | The request logs for ids that were found. |
getAppEngineLogLevel
(integer $syslog_level)
: integer
Translates a PHP
Useful when filtering logs by minimum severity level given the syslog level.
Name | Type | Description |
---|---|---|
$syslog_level | integer |
The priority level passed to
|
Type | Description |
---|---|
integer | The app engine severity level. |