- What does mnabialek/laravel-sql-logger do?
- It logs every SQL query your Laravel or Lumen application runs. Output can go to files, the console, or custom loggers, and you can inspect queries, bindings, and execution time for debugging and performance tuning.
- How do I install mnabialek/laravel-sql-logger?
- Install it with Composer using composer require mnabialek/laravel-sql-logger. Then follow the package README for configuration publishing or service provider steps, since exact setup can vary by Laravel version and package release.
- Does laravel-sql-logger support Laravel 12, 11, and 10?
- Version 2.2.12 adds Laravel 12 support. For Laravel 10 and 11 usage, verify the Composer constraints and test matrix for your specific package version before upgrading.
- How do I configure SQL query logging to a file or console?
- The package supports configurable output to files, the console, or custom loggers. Review the package configuration and README to select the destination, then confirm queries appear where expected.
- Can I log SQL bindings and execution time with laravel-sql-logger?
- Yes, the package is built to help you inspect queries, bindings, and execution time. That supports debugging unexpected query behavior and finding slow or repeated queries during performance tuning.
- Does laravel-sql-logger work with Lumen?
- The package description says it logs SQL queries in Laravel and Lumen. Check the README and Composer constraints for your Lumen version because setup can differ from Laravel.
- Can I use a custom logger with mnabialek/laravel-sql-logger?
- Yes, the package overview lists custom loggers alongside files and the console as configurable outputs. This lets you integrate SQL logging with your existing logging stack, but confirm the exact custom logger interface in the README.
- Is laravel-sql-logger safe to use in production?
- The package is a diagnostics tool, and logging every SQL query can add overhead in high-traffic or latency-sensitive applications. Enable it selectively, validate performance in staging, and avoid verbose SQL logging in production unless you have measured the impact.
- What PHP version does laravel-sql-logger require?
- The provided context does not specify an exact PHP requirement. Check composer.json for the PHP constraint, and for Laravel 12 projects confirm compatibility with Laravel 12's PHP 8.2 or newer baseline before upgrading.
- What should I check before upgrading laravel-sql-logger to v2.2.12?
- v2.2.12 is a patch-level release that adds Laravel 12 support, so breaking-change risk is expected to be low. Audit Composer constraints, PHP requirements, transitive dependencies, and Laravel 12 API compatibility, then run your full test suite with a rollback plan.