2017 © Pedro Peláez
 

plugin log-my-queries

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

image

technoknol/log-my-queries

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  • Friday, January 5, 2018
  • by technoknol
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

LogMyQueries

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries, (*1)

GitHub license StyleCI, (*2)

Install via composer

Run the following command to pull in the latest version:, (*3)

composer require technoknol/log-my-queries

Add middleware

Add the middleware to the $middleware array in the app/Http/Kernel.php file as follows:, (*4)

protected $middleware = [
        ...
        \technoknol\LogMyQueries\LogMyQueriesMiddleware::class
    ];

If you have APP_DEBUG=true and APP_LOG_LEVEL=debug you'll see all executed queries are being added in log file at storage/logs/laravel.log., (*5)

Example from laravel.log

[2018-01-02 09:20:26] local.DEBUG: LogMyQueries_STARTED  
[2018-01-02 09:20:26] local.DEBUG: select * from "users" where "id" = 102 limit 1  
[2018-01-02 09:20:26] local.DEBUG: LogMyQueries_STARTED  
[2018-01-02 09:20:28] local.DEBUG: LogMyQueries_STARTED  
[2018-01-02 09:20:28] local.DEBUG: select * from "users" where "id" = 102 limit 1  
[2018-01-02 09:20:28] local.DEBUG: update "users" set "remember_token" = "1q8nbeh2k6MkneGz31DCJaVJd4H1cBroBBLs6yCfQUoGQaFBSuVLFt7Br7mr" where "id" = "102"  

That's it. You're done., (*6)

The Versions

05/01 2018

dev-master

9999999-dev http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

  • php ^5.5.9 || ^7.0

 

laravel debug middleware log php logging query laravel-log log queries laravel-middleware

05/01 2018

v1.0.4

1.0.4.0 http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

  • php ^5.5.9 || ^7.0

 

laravel debug middleware log php logging query laravel-log log queries laravel-middleware

02/01 2018

v1.0.3

1.0.3.0 http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

  • php ^5.5.9 || ^7.0

 

laravel middleware log queries

02/01 2018

v1.0.2

1.0.2.0 http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

  • php ^5.5.9 || ^7.0

 

laravel middleware log queries

02/01 2018

v1.0.1

1.0.1.0 http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

  • php ^5.5.9 || ^7.0

 

laravel middleware log queries

02/01 2018

v1.0.0

1.0.0.0 http://shyammakwana.me

Laravel middleware to Log all queries being fired to Laravel log file. Uses Laravel's default monolog library and sniffs Eloquent queries

  Sources   Download

MIT

The Requires

 

laravel middleware log queries