Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

As PHP version 5.5 is no longer supported by the community, we strongly recommend new apps use the PHP 7+ runtime.

\google\appengine\api\log

Stay organized with collections Save and categorize content based on your preferences.

Classes

AppLogLine

Contains the details of a single application log created by calling

LogException

Thrown when there is a failure using the LogService.

LogService

The LogService allows an application to query for request and application logs. Application logs are added to a the current request log by calling {@link http://php.net/manual/en/function.syslog.php 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 based on the following mappings,

  • 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

RequestLog

Represents the details of a single request and may optionally contain application logs written during the request using the syslog function.

RequestLogIterator

Allows request logs to be iterated using a standard foreach statement but fetches the results in batches as needed.