Symfony,每页都没有明确错误的日志

时间:2014-04-23 21:31:59

标签: php symfony logging

我在这里遇到一个与symfony有关的奇怪问题。事实上,几天之后我就挣扎于这个“错误”:在我的应用程序的每个页面上加载,我在页面上没有错误,一切都很完美但是symfony在dev.log文件中写了一些日志。我读了它们但是只有抛出和捕获的事件,没有错误,我不知道在哪里搜索但这是一个问题因为dev.log文件增长得非常快^^。也许有人遇到同样的问题?或者可以在dev.log中填充一些东西:我也有FOSRestbundle / wsse,但是在其中找不到任何内容......

[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\BodyListener::onKernelRequest". [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2014-04-23 21:14:27] request.INFO: Matched route "romain_general_homepage" (parameters: "_controller": "Romain\GeneralBundle\Controller\GeneralController::presentationAction", "_route": "romain_general_homepage") [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2014-04-23 21:14:27] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2014-04-23 21:14:27] security.DEBUG: Read SecurityContext from the session [] []
[2014-04-23 21:14:27] security.DEBUG: Reloading user from user provider. [] []
[2014-04-23 21:14:28] security.DEBUG: Username "Voyager" was reloaded from user provider. [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "FOS\RestBundle\EventListener\ParamFetcherListener::onKernelController". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2014-04-23 21:14:28] event.DEBUG: Notified event "kernel.controller" to listener "FOS\RestBundle\EventListener\ViewResponseListener::onKernelController". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener   "Symfony\Component\Security\Http\Firewall\ContextListener::onKernelResponse". [] []
[2014-04-23 21:14:29] security.DEBUG: Write SecurityContext in the session [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:29] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onKernelTerminate". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "FOS\RestBundle\EventListener\BodyListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2014-04-23 21:14:32] request.INFO: Matched route "_wdt" (parameters: "_controller": "web_profiler.controller.profiler:toolbarAction", "token": "6e72f6", "_route": "_wdt") [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener::injectLogger". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "FOS\RestBundle\EventListener\ParamFetcherListener::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.controller" to listener "FOS\RestBundle\EventListener\ViewResponseListener::onKernelController". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2014-04-23 21:14:32] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onKernelTerminate". [] []

和doctrine_dev.log(我将文件分开......)

[2014-04-23 21:14:27] doctrine.DEBUG: SELECT t0.username AS username1, t0.username_canonical AS username_canonical2, t0.email AS email3, t0.email_canonical AS email_canonical4, t0.enabled AS enabled5, t0.salt AS salt6, t0.password AS password7, t0.last_login AS last_login8, t0.locked AS locked9, t0.expired AS expired10, t0.expires_at AS expires_at11, t0.confirmation_token AS confirmation_token12, t0.password_requested_at AS password_requested_at13, t0.roles AS roles14, t0.credentials_expired AS credentials_expired15, t0.credentials_expire_at AS credentials_expire_at16, t0.id AS id17, t0.nom AS nom18, t0.prenom AS prenom19, t0.termes AS termes20 FROM user t0 WHERE t0.id = ? LIMIT 1 [1] []
[2014-04-23 21:14:29] doctrine.DEBUG: SELECT t0.id AS id1, t0.nom AS nom2, t0.localisation AS localisation3, t0.dateCreation AS dateCreation4, t0.proprietaire_id AS proprietaire_id5 FROM groupe t0 INNER JOIN groupe_user ON t0.id = groupe_user.groupe_id WHERE groupe_user.user_id = ? [1] []
[2014-04-23 21:14:29] doctrine.DEBUG: SELECT t0.id AS id1, t0.dateCreation AS dateCreation2, t0.description AS description3, t0.type AS type4, t0.criticite AS criticite5, t0.vu AS vu6, t0.info AS info7, t0.user_id AS user_id8 FROM notification t0 WHERE t0.user_id = ? [1] []

我是唯一一个人吗?我认为有一个没有日志的错误,在页面上看不到。 无论如何,谢谢你的时间。

1 个答案:

答案 0 :(得分:1)

日志文件不必仅包含错误,而是包含各种类型的消息。您粘贴的是调试消息。您可以更改dev环境配置而不是这样做,但我认为没有理由为什么。

如果您在prod环境中使用您的应用程序(没有app_dev.php),则不会记录调试消息。