2017 © Pedro Peláez
 

library glue-monolog

Use monolog logger in Glue

image

gluephp/glue-monolog

Use monolog logger in Glue

  • Friday, May 6, 2016
  • by gluephp
  • Repository
  • 1 Watchers
  • 1 Stars
  • 92 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Monolog for Glue

Use Monolog with gluephp/glue, (*1)

Installation

Use Composer:, (*2)

$ composer require gluephp/glue-monolog

Configure Monolog

$app = new Glue\App;

$app->config->override([
    'monolog' => [
        'folder'    => '/absolute/path/to/log/folder',
        'file'      => 'log_' . date('Ymd') . '.log',
        'level'     => 'error' // PSR-3 logging level
    ],
]);

Register Monolog

$app->register(
    new Glue\Monolog\ServiceProvider()
);

Get the Monolog instance

Once the service provider is registered, you can fetch the Monolog instance with:, (*3)

$monolog = $app->make('Monolog\Logger');

or since Monolog implements the PSR interface:, (*4)

$monolog = $app->make('Psr\Log\LoggerInterface');

or use the alias:, (*5)

$monolog = $app->log;

The Versions

06/05 2016

dev-master

9999999-dev

Use monolog logger in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

dev-develop

dev-develop

Use monolog logger in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson

06/05 2016

0.1.0

0.1.0.0

Use monolog logger in Glue

  Sources   Download

MIT

The Requires

 

by Magnus Eriksson