2017 © Pedro Peláez
 

symfony-bundle propel-logger-bundle

Extended Propel Logger Bundle for Symfony 2 PHP Framework

image

divi/propel-logger-bundle

Extended Propel Logger Bundle for Symfony 2 PHP Framework

  • Friday, June 27, 2014
  • by Divi
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2,094 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Propel Logger Bundle

This logger show you full queries stacktraces and duplicate queries.
For each stacktrace you can see the inner class/file code., (*1)

Prerequisites

This version of the bundle requires Symfony => 2.2.x. If you use Symfony 2.1.x, please switch to the branch 2.1.
If you use PHP 5.3, please switch on the php5.3 branch., (*2)

Installation

Step 1: Download PropelLoggerBundle using composer

In your composer.json, add PropelLoggerBundle (only for dev) :, (*3)

{
    "require-dev": {
        "divi/propel-logger-bundle": "2.2.*@dev"
    }
}

Now, you must update your vendors using this command :, (*4)

``` bash $ php composer.phar update divi/propel-logger-bundle, (*5)


### Step 2: Enable the bundle Enable the bundle using the AppKernel : ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Divi\PropelLoggerBundle\DiviPropelLoggerBundle(), ); }

Step 3: Configure your project

Configure the logger, you must provide your application namespace (only the organisation, like "Acme"). You can provide an array, and/or regex. Warning: if you provide a fully namespace, like "Foo\Bar", please double the backslash : it's a regex., (*6)

``` yaml, (*7)

app/config/config.yml

divi_propel_logger: namespaces: ["Acme", "Foo\Bar"] ```, (*8)

How to use

Now, in the Symfony web debug toolbar, you'll have a red circle if you have a duplicate query. If you want to see the stacktrace, open the Propel profiler, and click on "Explain the query" on the selected query., (*9)

Test instance

You can have memory leak issue in test instance (unit tests) due to the stacktrace saving process.
If an issue appears, just load the bundle only for dev instance in your AppKernel, move the bundle configuration to config_dev.yml and in the config_test.yml, do not import the config_dev.yml file but config.yml. Finally, copy and paste the monolog configuration section from the dev config to your test config file., (*10)

Issue or new feature ?

Feel free to post your issue or feature request in the issue tracker !, (*11)

The Versions

27/06 2014

dev-php5.3

dev-php5.3 https://github.com/Divi/PropelLoggerBundle

Extended Propel Logger Bundle for Symfony 2 PHP Framework

  Sources   Download

MIT

The Requires

 

by Sylvain Lorinet

sql logger symfony optimization propel

27/06 2014

dev-master

9999999-dev https://github.com/Divi/PropelLoggerBundle

Extended Propel Logger Bundle for Symfony 2 PHP Framework

  Sources   Download

MIT

The Requires

 

by Sylvain Lorinet

sql logger symfony optimization propel

09/08 2013

2.1.x-dev

2.1.9999999.9999999-dev https://github.com/Divi/PropelLoggerBundle

Extended Propel Logger Bundle for Symfony 2 PHP Framework

  Sources   Download

MIT

The Requires

 

by Sylvain Lorinet

sql logger symfony optimization propel