Skip to content

Commit

Permalink
Merge pull request #53 from sj-i/defaulting-to-json-log
Browse files Browse the repository at this point in the history
add missing commit for the configuration of logger
  • Loading branch information
sj-i committed Aug 13, 2021
2 parents cefdd75 + 9004b63 commit a93aeaa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions config/di.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@
},
LoggerInterface::class => function (Config $config) {
$logger = new Logger('default');
$logger->pushHandler(
new StreamHandler(
$config->get('log.path.default'),
Logger::toMonologLevel($config->get('log.level'))
)
$handler = new StreamHandler(
$config->get('log.path.default'),
Logger::toMonologLevel($config->get('log.level'))
);
$handler->setFormatter(new JsonFormatter());
$logger->pushHandler($handler);
Expand Down

0 comments on commit a93aeaa

Please sign in to comment.