ho usato la seguente configurazione per la mia registrazione di produzione:errori nel registro ancora più verbosely con Symfony2
monolog:
handlers:
mail:
type: fingers_crossed
action_level: error
handler: grouped
grouped:
type: group
members: [streamed, buffered]
streamed:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
# buffered is used to accumulate errors and send them as batch to the email address
buffered:
type: buffer
handler: swift
swift:
type: swift_mailer
from_email: [email protected]
to_email: [email protected]
subject: Error Occurred!
level: debug
questo invia messaggi di posta elettronica come questo:
[2012-03-21 21:24:09] security.DEBUG: Read SecurityContext from the session [] []
[2012-03-21 21:24:09] security.DEBUG: Reloading user from user provider. [] []
[2012-03-21 21:24:09] security.DEBUG: Username "jakob.asdf" was reloaded from user provider. [] [] [2012-03-21 21:24:09] request.INFO: Matched route "_user_settings" (parameters: "_controller": "...Bundle\Controller\UserController::settingsAction", "username": "Jakob.asdf", "_route": "_user_settings") [] []
[2012-03-21 21:24:09] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: ...Bundle\Entity\User object not found. (uncaught exception) at /var/www/.../vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php line 50 [] []
[2012-03-21 21:24:09] security.DEBUG: Write SecurityContext in the session [] []
mi piacerebbe molto avere una traccia dello stack qui, o almeno il numero di riga nel mio controller che ha attivato l'errore. Altrimenti è davvero un sacco di supposizioni su cosa potrebbe essere andato storto.
Ora, la domanda: esiste un modo per ottenere un registro ancora più dettagliato?
fantastico - grazie! – stoefln