2017 © Pedro Peláez
 

library monolog-pusher

Monolog handler for sending logs to Pusher

image

shalvah/monolog-pusher

Monolog handler for sending logs to Pusher

  • Friday, June 1, 2018
  • by shalvah
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

monolog-pusher

Build Status Latest Stable Version, (*1)

Monolog handler that sends logs to Pusher Channels., (*2)

Installation

composer require shalvah/monolog-pusher

Usage

$config = ['YOUR_APP_KEY', 'YOUR_APP_SECRET', 'YOUR_APP_ID', ['cluster' => 'YOUR_APP_CLUSTER']];
$handler = new \Shalvah\MonologPusher\PusherHandler($config);
  • Alternatively, if you've already got an existing Pusher instance, you can pass that to the handler:
$pusher = new \Pusher\Pusher();
$handler = new \Shalvah\MonologPusher\PusherHandler($pusher);
  • Attach the handler to your Monolog logger:
$logger = new \Monolog\Logger('pusher-logs');
$logger->pushHandler($handler);
  • Now you can call the various log methods (info, error, debugand so forth) on your logger to send a log message to Pusher. The name of the Pusher channel used will be the name you set when creating your Logger (in the above example, "pusher-logs"). The name of the event will be log:
$logger->error('oops!');

By default, the PusherHandler will only log messages of level error and above. You can change this by passing a minimum level as a second parameter to the constructor:, (*3)

$handler = new \Shalvah\MonologPusher\PusherHandler($config, \Monolog\Logger::DEBUG);

The Versions

01/06 2018

dev-master

9999999-dev

Monolog handler for sending logs to Pusher

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shalvah A

logging monolog error pusher logs

01/06 2018

1.0

1.0.0.0

Monolog handler for sending logs to Pusher

  Sources   Download

MIT

The Requires

 

The Development Requires

by Shalvah A

logging monolog error pusher logs