Commit d72829f9 authored by Fabien Potencier's avatar Fabien Potencier

bug #1362 Added monolog.formatter.output and monolog.formatter.dateformat param… (grunch)

This PR was squashed before being merged into the 2.2.x-dev branch (closes #1362).

Discussion
----------

Added monolog.formatter.output and monolog.formatter.dateformat param…

…eters to format the line

Commits
-------

b4f5a709 Added monolog.formatter.output and monolog.formatter.dateformat param…
parents 570cffad b4f5a709
......@@ -74,8 +74,8 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
return $log;
};
$app['monolog.formatter'] = function () {
return new LineFormatter();
$app['monolog.formatter'] = function () use ($app) {
return new LineFormatter($app['monolog.formatter.output'], $app['monolog.formatter.dateformat']);
};
$app['monolog.handler'] = $defaultHandler = function () use ($app) {
......@@ -114,6 +114,8 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
$app['monolog.use_error_handler'] = function ($app) {
return !$app['debug'];
};
$app['monolog.formatter.output'] = "[%datetime%] [%level_name%] %channel% - %message% %context% %extra%\n";
$app['monolog.formatter.dateformat'] = 'Y-m-d H:i:s';
}
public function boot(Application $app)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment