2017 © Pedro Peláez
 

library monolog-splunk-formatter

Splunk Line Formatter for Monolog

image

vube/monolog-splunk-formatter

Splunk Line Formatter for Monolog

  • Friday, May 22, 2015
  • by ross-p
  • Repository
  • 4 Watchers
  • 4 Stars
  • 97,088 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 15 % Grown

The README.md

Splunk Formatter

Build Status Coverage Status Latest Stable Version Dependency Status, (*1)

A Splunk Formatter for Monolog, (*2)

About

vube/monolog-splunk-formatter is a formatter for use with Monolog. It augments the Monolog LineFormatter by adding Splunk-optimized handling of associative array contexts., (*3)

Prerequisites/Requirements

  • PHP 5.3.0 or greater
  • Composer

Installation

Installation is possible using Composer, (*4)

composer require vube/monolog-splunk-formatter ~1.0

Usage

Create an instance of \Vube\Monolog\Formatter\SplunkLineFormatter and set it as the formatter for the \Monolog\Handler\StreamHandler that you use with your \Monolog\Logger instance., (*5)

use \Monolog\Logger;
use \Monolog\Handler\StreamHandler;
use \Vube\Monolog\Formatter\SplunkLineFormatter;

$log = new Logger('DEMO');
$handler = new StreamHandler('php://stdout', Logger::WARNING);
$handler->setFormatter(new SplunkLineFormatter());
$log->pushHandler($handler);

$log->addError('Bad stuff happened', array('detail1' => 'something', 'detail2' => 'otherthing'));

Unit Testing

vube/monolog-splunk-formatter ships with unit tests using PHPUnit., (*6)

  • If PHPUnit is installed globally run phpunit to run the tests., (*7)

  • If PHPUnit is not installed globally, install it locally through composer by running composer install --dev. Run the tests themselves by calling vendor/bin/phpunit., (*8)

Unit tests are also automatically run on Travis CI, (*9)

License

vube/monolog-splunk-formatter is released under the MIT public license. See the enclosed LICENSE for details., (*10)

Thanks

Thanks to Bramus for contributing a Monolog formatter, I was inspired by and reused some of his work., (*11)

The Versions

22/05 2015

dev-master

9999999-dev

Splunk Line Formatter for Monolog

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

22/05 2015

1.0.1

1.0.1.0

Splunk Line Formatter for Monolog

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

17/02 2015

1.0.0

1.0.0.0

Splunk Line Formatter for Monolog

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires