Skip to content

Commit fe5c3c6

Browse files
committed
Use pretty formatter for verbose console output
1 parent d76b868 commit fe5c3c6

2 files changed

Lines changed: 17 additions & 11 deletions

File tree

‎composer.lock‎

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/Application.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Phpactor;
44

5+
use Phpactor\Extension\Logger\Formatter\PrettyFormatter;
56
use Symfony\Component\Console\Application as SymfonyApplication;
67
use Symfony\Component\Console\Input\InputInterface;
78
use Symfony\Component\Console\Output\OutputInterface;
@@ -38,7 +39,9 @@ public function doRun(InputInterface $input, OutputInterface $output)
3839
$this->setCatchExceptions(false);
3940

4041
if ($output->isVerbose()) {
41-
$this->container->get(LoggingExtension::SERVICE_LOGGER)->pushHandler(new StreamHandler(STDERR));
42+
$handler = new StreamHandler(STDERR);
43+
$handler->setFormatter($this->container->get(PrettyFormatter::class));
44+
$this->container->get(LoggingExtension::SERVICE_LOGGER)->pushHandler($handler);
4245
}
4346

4447
$formatter = $output->getFormatter();

0 commit comments

Comments
 (0)