Skip to content

Commit d266f3c

Browse files
committed
register a NullLogger to silence logs
1 parent f512797 commit d266f3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/Functional/app/AppKernel.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
$dir = dirname($dir);
3939
}
4040

41+
use Psr\Log\NullLogger;
4142
use Symfony\Component\Config\Loader\LoaderInterface;
43+
use Symfony\Component\DependencyInjection\ContainerBuilder;
4244
use Symfony\Component\Filesystem\Filesystem;
4345
use Symfony\Component\HttpKernel\Kernel;
4446

@@ -95,6 +97,9 @@ public function getLogDir()
9597
public function registerContainerConfiguration(LoaderInterface $loader)
9698
{
9799
$loader->load($this->rootConfig);
100+
$loader->load(function (ContainerBuilder $container) {
101+
$container->register('logger', NullLogger::class);
102+
});
98103
}
99104

100105
public function serialize()

0 commit comments

Comments
 (0)