google / cloud-logging
PHP 的 Stackdriver Logging 客户端
v1.30.3
2024-06-28 21:34 UTC
Requires
- php: ^8.0
- google/cloud-core: ^1.58
- google/gax: ^1.34.0
Requires (Dev)
- erusev/parsedown: ^1.6
- fig/log-test: ^1.1
- google/cloud-bigquery: ^1.0
- google/cloud-pubsub: ^2.0
- google/cloud-storage: ^1.3
- monolog/monolog: 3.7.0
- opis/closure: ^3
- phpdocumentor/reflection: ^5.3.3
- phpdocumentor/reflection-docblock: ^5.3
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: 2.*
Suggests
- ext-grpc: The gRPC extension enables use of the performant gRPC transport
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
- psr/log: For using the PSR logger. Currently supports versions 1 and 2.
Provides
- psr/log-implementation: 2.0||3.0
- dev-main
- v1.30.3
- v1.30.2
- v1.30.1
- v1.30.0
- v1.29.4
- v1.29.3
- v1.29.2
- v1.29.1
- v1.29.0
- v1.28.5
- v1.28.4
- v1.28.3
- v1.28.2
- v1.28.1
- v1.28.0
- v1.27.1
- v1.27.0
- v1.26.0
- v1.25.5
- v1.25.4
- v1.25.3
- v1.25.2
- v1.25.1
- v1.25.0
- v1.24.10
- v1.24.9
- v1.24.8
- v1.24.7
- v1.24.6
- v1.24.5
- v1.24.4
- v1.24.3
- v1.24.2
- v1.24.1
- v1.24.0
- v1.23.0
- v1.22.3
- v1.22.2
- v1.22.1
- v1.22.0
- v1.21.1
- v1.21.0
- v1.20.1
- v1.20.0
- v1.19.1
- v1.19.0
- v1.18.0
- v1.17.0
- v1.16.5
- v1.16.4
- v1.16.3
- v1.16.2
- v1.16.1
- v1.16.0
- v1.15.0
- v1.14.5
- v1.14.4
- v1.14.3
- v1.14.2
- v1.14.1
- v1.14.0
- v1.13.0
- v1.12.9
- v1.12.8
- v1.12.7
- v1.12.6
- v1.12.5
- v1.12.4
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.5
- v1.10.4
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
- v0.1.0
- dev-policy-bot-8ac689b6-9ca6-44ac-ae26-42047273a6c5
- dev-policy-bot-552f414f-224f-4fe9-9d18-fffa83274076
This package is auto-updated.
Last update: 2024-08-28 22:01:47 UTC
README
Stackdriver Logging 的 PHP 风格客户端。
注意:此存储库是 Google Cloud PHP 的一部分 (Google Cloud PHP)。任何支持请求、错误报告或开发贡献应指向该项目。
允许您存储、搜索、分析、监控和警告来自 Google Cloud Platform 和 Amazon Web Services 的日志数据和事件。
安装
首先,安装 PHP 选择的依赖管理器 Composer。
现在安装此组件
$ composer require google/cloud-logging
此组件支持 HTTP/1.1 上的 REST 和 gRPC。为了利用 gRPC 提供的好处(如流式方法),请参阅我们的 gRPC 安装指南。
身份验证
请参阅我们的 身份验证指南 了解如何对客户端进行身份验证。身份验证后,您即可开始发出请求。
示例
require 'vendor/autoload.php'; use Google\Cloud\Logging\LoggingClient; $logging = new LoggingClient(); // Get a logger instance. $logger = $logging->logger('my_log'); // Write a log entry. $logger->write('my message'); // List log entries from a specific log. $entries = $logging->entries([ 'filter' => 'logName = projects/my_project/logs/my_log' ]); foreach ($entries as $entry) { echo $entry->info()['textPayload'] . "\n"; }
版本
此组件被视为 GA(一般可用)。因此,它不会在任何次要或补丁版本中引入不兼容的更改。我们将优先处理问题和请求。