8000 [HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger by dunglas · Pull Request #24300 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel][FrameworkBundle] Add a minimalist default PSR-3 logger #24300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove final and @internal. Change pass priority.
  • Loading branch information
dunglas committed Sep 28, 2017
commit 9dde784f49fc6a887304b315f7249828291c7a6a
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function build(ContainerBuilder $container)
{
parent::build($container);

$container->addCompilerPass(new LoggerPass());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I meant something like:
new LoggerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32
but maybe order doesn't/shouldn't matter in fact?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it doesn't matter, but I'm not 100% sure. Will add your patch.

$container->addCompilerPass(new RegisterControllerArgumentLocatorsPass());
$container->addCompilerPass(new RemoveEmptyControllerArgumentLocatorsPass(), PassConfig::TYPE_BEFORE_REMOVING);
$container->addCompilerPass(new RoutingResolverPass());
Expand Down Expand Up @@ -120,7 +121,6 @@ public function build(ContainerBuilder $container)
$this->addCompilerPassIfExists($container, FormPass::class);
$container->addCompilerPass(new WorkflowGuardListenerPass());
$container->addCompilerPass(new ResettableServicePass());
$container->addCompilerPass(new LoggerPass());

if ($container->getParameter('kernel.debug')) {
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
Expand Down
4 changes: 1 addition & 3 deletions src/Symfony/Component/HttpKernel/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
/**
* Minimalist PSR-3 logger designed to write in stderr or any other stream.
*
* @internal
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
final class Logger extends AbstractLogger
class Logger extends AbstractLogger
{
private static $levels = array(
LogLevel::DEBUG => 0,
Expand Down
0