blue32a / monolog-google-cloud-logging
Google Cloud Logging handler for Monolog.
v1.0.0
2022-10-21 09:40 UTC
Requires
- php: >=7.4
- google/cloud-logging: ^1.24
- monolog/monolog: ^2.0
Requires (Dev)
README
About
Google Cloud Logging handler for Monolog.
Installation
$ composer require blue32a/monolog-google-cloud-logging
Usage
use Blue32a\MonologGoogleCloudLoggingHandler\GoogleCloudLoggingHandler; $logger = new \Monolog\Logger(); $config = ['projectId' => 'xxxxx']; $loggingClient = GoogleCloudLoggingHandler::factoryLoggingClient($config); $handler = new GoogleCloudLoggingHandler('logname', $loggingClient); $logger->pushHandler($handler); $logger->info('Hello World!');