Commit b4f5a709 authored by Francisco Calderon's avatar Francisco Calderon Committed by Fabien Potencier

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

parent 42bda7b7
......@@ -69,8 +69,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) {
......@@ -107,6 +107,8 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
$app['monolog.exception.logger_filter'] = null;
$app['monolog.logfile'] = null;
$app['monolog.use_error_handler'] = !$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)
......@@ -137,3 +139,4 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
return $levels[$upper];
}
}
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