Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

Discover the SensioLabs Support

Access to the SensioLabs Competency Center for an exclusive and tailor-made support on Symfony
sensiolabs.com

gravatar
Using Propel 1.4 detailed logging
by Fabian Lange – November 08, 2009 – 6 comments

Today Propel 1.4 was released and it contains some debugging goodies. We can use the DebugPDO class to get the nifty logging into the Web Debug Panel. However some more interesting information is turned off by default by Propel. It includes:

  • Time logging
    • Time spent for executing this query
  • Memory logging
    • Peak Usage during execution of the query
    • Total Memory usage after the query ran
    • Memory Delta caused by executing the query
  • Slow query logging
    • Duration after which a query is considered slow

Using this is very easy as of today / symfony 1.3 beta 2:

dev:
  propel:
    param:
      classname: DebugPDO
      debug:
        realmemoryusage: true
        details:
          time:
            enabled: true
          slow:
            enabled: true
            threshold: 0.001
          memdelta:
            enabled: true
          mempeak:
            enabled: true
          method:
            enabled: true
          mem:
            enabled: true
          querycount:
            enabled: true

The whole list can be found in the Propel Documentation. The prefix debugpdo.logging is taken care of by the key debug. Simply put the remaining path below it, creating a new nesting level each dot.

Because Propel takes the order into account, the above configuration results into something like this:

Propel 1.4 detailed logging

Comments RSS

  • gravatar
    #1 M said on the 2009/11/08 at 22:07
    "Time logging", "Memory logging", "Slow query logging"

    AWESOME! :)
  • gravatar
    #2 BabyWolf said on the 2009/11/09 at 07:44
    Very good!
  • gravatar
    #3 Marco Schierhorn said on the 2009/11/09 at 10:50
    Awesome.Thats what I call a DB Debug Toolbar
  • gravatar
    #4 Disco Zohan said on the 2009/11/09 at 17:26
    Will doctrine 1.2 provide some functionality like this?
    P.s. with symfony 1.2 + doctrine 1.1 there are just queries, even without execution time ..
  • gravatar
    #5 Titang said on the 2009/11/11 at 17:20
    I was looking for this for a long time! That's a really great tool for debuging/optimization
  • gravatar
    #6 Etienne Bohm said on the 2009/11/19 at 13:15
    I thought propel was no longer supported on symfony.
    I think Propel is a very good ORM.
    Can we still use it for new project?