Skip to content

A generic Hander extending Monolog/StreamHandler for Stackdriver Structured Logging

License

Notifications You must be signed in to change notification settings

vivantehealth/Monolog-Stackdriver-Handler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monolog-stackdriver-handler

Monolog Handler Structured Logging [https://cloud.google.com/logging/docs/structured-logging]

This handler is GCP_PROJECT ID agnostic.

Extends Monolog\Handler\StreamHandler setting the formatter to JsonFormatter and adding severity field, while eliminating unused information.

Installation

composer require vivante-health/monolog-stackdriver-handler

Basic Usage

<?php

use VivanteHealth\MonologStackdriverHandler\StackdriverHandler;

$log = new Logger('name');
$log->pushHandler(
    new StackdriverHandler()
);

License

vivante-health/monolog-stackdriver-handler is licensed under the MIT License - see the LICENSE file for details

About

A generic Hander extending Monolog/StreamHandler for Stackdriver Structured Logging

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%