mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Add second logging channel
This commit is contained in:
@@ -37,7 +37,21 @@ abstract class Command extends SymfoCommand
|
||||
{
|
||||
if ($input->getOption('verbose')) {
|
||||
$handler = new StreamHandler('php://stdout');
|
||||
$this->container['monolog']->pushHandler($handler);
|
||||
|
||||
$this->container['monolog'] = $this->container->share(
|
||||
$this->container->extend('monolog', function($logger, $app) use ($handler) {
|
||||
$logger->pushHandler($handler);
|
||||
|
||||
return $logger;
|
||||
})
|
||||
);
|
||||
$this->container['task-manager.logger'] = $this->container->share(
|
||||
$this->container->extend('task-manager.logger', function($logger, $app) use ($handler) {
|
||||
$logger->pushHandler($handler);
|
||||
|
||||
return $logger;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return $this->doExecute($input, $output);
|
||||
|
Reference in New Issue
Block a user