macpaw/monolog-gke-formatter

Monolog JSON Formatter for Google StackDriver integration

v0.2.2 2023-01-13 10:51 UTC

This package is auto-updated.

Last update: 2024-11-13 14:42:34 UTC


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());