Skip to content

MacPaw/monolog-gke-formatter

Repository files navigation

Monolog extension for Google Cloud logging formatter

This library can re-format json log to Google Kubernetes Engine format

Version Build Status
master CI

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