2017 © Pedro Peláez
 

library monolog-google-cloud-json-formatter

A Monolog extension for formatting log entries for Google Cloud Logging

image

superbalist/monolog-google-cloud-json-formatter

A Monolog extension for formatting log entries for Google Cloud Logging

  • Monday, February 6, 2017
  • by matthewgoslett
  • Repository
  • 23 Watchers
  • 7 Stars
  • 18,290 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

A Monolog extension for formatting log entries for Google Cloud Logging

Author StyleCI Software License Packagist Version Total Downloads Build Status, (*1)

This library works in conjunction with https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud, (*2)

fluent-plugin-google-cloud is an output plugin for fluentd which sends logs to the Google Cloud Logging API., (*3)

This formatter outputs logs entries in json which the fluent-plugin-google-cloud application understands., (*4)

Installation

composer require superbalist/monolog-google-cloud-json-formatter

Usage

use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Superbalist\Monolog\Formatter;

// create a handler
$handler = new StreamHandler('path/to/your.log', Logger::WARNING);

// use custom formatter in handler
$handler->setFormatter(new GoogleCloudJsonFormatter());

// create a log channel
$log = new Logger('name');
$log->pushHandler($handler);

// add records to the log
$log->addWarning('Foo');
$log->addError('Bar');

The Versions

06/02 2017

dev-master

9999999-dev

A Monolog extension for formatting log entries for Google Cloud Logging

  Sources   Download

MIT

The Requires

 

The Development Requires

by Superbalist.com a division of Takealot Online (Pty) Ltd

04/04 2016

1.0.0

1.0.0.0

A Monolog extension for formatting log entries for Google Cloud Logging

  Sources   Download

MIT

The Requires

 

by Superbalist.com a division of Takealot Online (Pty) Ltd