diff --git a/README.md b/README.md index 45a049a..33eb22a 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,7 @@ composer require rokde/laravel-slow-query-logger ``` -In old Laravel you need to add to `providers` in `config/app.php`: - -``` -Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider::class, -``` +Look into your `laravel.log` file to see your messy queries. ## Installation @@ -26,24 +22,30 @@ Run `php artisan vendor:publish --provider="Rokde\LaravelSlowQueryLogger\Laravel ## Configuration -### `time-to-log` +### `enabled` -Only log queries longer than this value in microseconds. +Enable the slow queries logger. -You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG`. +You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_ENABLED`. It is `false` by default. -### `enabled` +### `channel` -Enable the slow queries logger. +Sets the channel to log in. -You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_ENABLED`. +You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_CHANNEL`. It is `single` by default. ### `log-level` Set the log-level for logging the slow queries. -You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL`. +You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL`. It is `debug` by default. + +### `time-to-log` + +Only log queries longer than this value in microseconds. + +You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG`. It is `0.7` by default. ## Usage -Nothing to do after adding to `/config/app.php`. Watch your logs. +Start your application and look into your logs to identify the slow queries. \ No newline at end of file