macpaw / monolog-gke-formatter
Monolog JSON Formatter for Google StackDriver integration
Installs: 221 065
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 7
Forks: 5
Open Issues: 1
Requires
- php: >=7.2
- guzzlehttp/psr7: ^1.6|^2.0
- monolog/monolog: ^2.1
Requires (Dev)
- phpstan/phpstan: ^1.2
- squizlabs/php_codesniffer: ^3.5
README
This library can re-format json log to Google Kubernetes Engine format
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version:
composer require macpaw/monolog-gke-formatter
Usage
use Monolog\Logger; use Monolog\Handler\StreamHandler; use MacPaw\MonologGkeFormatter\GkeFormatter; $handler = new StreamHandler('php://stdout'); $handler->setFormatter(new GkeFormatter());