Enable logger and stopwatch for Doctrine queries
merged branch GromNaN/dbal-logger (PR #632)

This PR was merged into the master branch.

Commits
-------

fbffc2b Enable logger and stopwatch for Doctrine queries

Discussion
----------

Add logger and stopwatch for Doctrine queries

Add SQL queries to the logs using the DbalLogger of the DoctrineBridge.

In addition, if the WebprofilerServiceProvider is registered (stopwatch service set), the timeline show doctrine queries.

![Profiler](https://f.cloud.github.com/assets/400034/152414/877dc396-75c4-11e2-96df-6dde93c7d86e.png)

---------------------------------------------------------------------------

by DerManoMann at 2013-02-13T10:37:42Z

:+1:

---------------------------------------------------------------------------

by fabpot at 2013-02-13T10:39:34Z

I'm wondering if the stopwatch service should be moved to Silex core.

---------------------------------------------------------------------------

by lyrixx at 2013-02-13T11:05:00Z

Totally :+1: for moving it to silex.

---------------------------------------------------------------------------

by GromNaN at 2013-02-13T11:16:20Z

Is there a use case for the "stopwatch" outside of the webprofiler ?

---------------------------------------------------------------------------

by lyrixx at 2013-02-13T11:23:44Z

@GromNaN Yes, it you want to bench some code.

---------------------------------------------------------------------------

by henrikbjorn at 2013-02-13T11:35:28Z

@fabpot please not it will only add cruft. i think it is a niche thing to use the Stopwatch component.