0

查看从底部开始的第 2 行和第 3 行:

[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] request.INFO: Matched route "myapp_main_default_index" (parameters: "_controller": "Myapp\MainBundle\Controller\DefaultController::indexAction", "_route": "myapp_main_default_index") [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Read SecurityContext from the session [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Reloading user from user provider. [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"find":true,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[],"db":"myapp_db","collection":"User"} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"limit":true,"limitNum":1,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[]} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"limit":true,"limitNum":1,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[]} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Username "test" was reloaded from user provider. [] {"token":"504f6a8727898"}

在我看来,它正在重复查询。

我该怎么办?

4

1 回答 1

0

现在我认为它不止一次查询,它只是它的记录方式。在其他查询中,查询的每个部分都有 1 个日志行,但开发工具栏显示为 1 个查询,因此它必须是正确的。

于 2012-10-09T02:04:06.017 回答