gluephp / glue-monolog
Use monolog logger in Glue
Installs: 157
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/gluephp/glue-monolog
Requires
- php: >=5.5.0
- monolog/monolog: 1.*
This package is not auto-updated.
Last update: 2026-02-23 13:32:03 UTC
README
Use Monolog with gluephp/glue
Installation
Use Composer:
$ 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:
$monolog = $app->make('Monolog\Logger');
or since Monolog implements the PSR interface:
$monolog = $app->make('Psr\Log\LoggerInterface');
or use the alias:
$monolog = $app->log;