Installation: Add to composer.json under require-dev:
"divi/propel-logger-bundle": "2.2.*@dev"
Run composer update divi/propel-logger-bundle.
Enable Bundle: Register in AppKernel.php:
new Divi\PropelLoggerBundle\DiviPropelLoggerBundle(),
Configure: Define namespaces in config.yml (e.g., ["Acme", "Foo\\Bar"]).
divi_propel_logger:
namespaces: ["Acme"]
First Use Case: Trigger a Propel query in your controller/service. Open the Symfony Profiler (e.g., /_profiler/). The Propel Logger tab will now show:
Debugging Queries:
Performance Tuning:
Acme\Service) to isolate bottlenecks.QueryModel objects to avoid duplicates (the bundle flags them).Conditional Logging:
AppKernel.php or setting divi_propel_logger.enabled: false in config.Custom Logging:
Divi\PropelLoggerBundle\Logger\PropelLogger and inject your instance via dependency injection.Namespace Regex Quirk:
Foo\\Bar (double backslash) for exact matches. Omitting it treats it as a regex.["Acme", "App\\Controller"] logs only those classes.Performance Overhead:
Symfony 2.2+ Only:
AppKernel.php for compatibility.Profiler Cache:
php app/console cache:clear) if logs don’t appear after config changes.divi_propel_logger.namespaces includes your app’s namespace.AppKernel.php for the bundle registration.xdebug.max_nesting_level in php.ini if queries span many levels.QueryModel::clear() sparingly—it resets the entire query cache.Divi\PropelLoggerBundle\Formatter\QueryFormatter to change output (e.g., add execution time).propel.logger.query events to log queries to external tools (e.g., Datadog).propel.logger.before_query to modify queries dynamically.How can I help you explore Laravel packages today?