Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit 20fe66e

Browse files
author
rok
committed
document the new configuration
1 parent e9ca49f commit 20fe66e

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
composer require rokde/laravel-slow-query-logger
99
```
1010

11-
In old Laravel you need to add to `providers` in `config/app.php`:
12-
13-
```
14-
Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider::class,
15-
```
11+
Look into your `laravel.log` file to see your messy queries.
1612

1713
## Installation
1814

@@ -26,24 +22,30 @@ Run `php artisan vendor:publish --provider="Rokde\LaravelSlowQueryLogger\Laravel
2622

2723
## Configuration
2824

29-
### `time-to-log`
25+
### `enabled`
3026

31-
Only log queries longer than this value in microseconds.
27+
Enable the slow queries logger.
3228

33-
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG`.
29+
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_ENABLED`. It is `false` by default.
3430

35-
### `enabled`
31+
### `channel`
3632

37-
Enable the slow queries logger.
33+
Sets the channel to log in.
3834

39-
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_ENABLED`.
35+
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_CHANNEL`. It is `single` by default.
4036

4137
### `log-level`
4238

4339
Set the log-level for logging the slow queries.
4440

45-
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL`.
41+
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL`. It is `debug` by default.
42+
43+
### `time-to-log`
44+
45+
Only log queries longer than this value in microseconds.
46+
47+
You can set this value through environment variable `LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG`. It is `0.7` by default.
4648

4749
## Usage
4850

49-
Nothing to do after adding to `/config/app.php`. Watch your logs.
51+
Start your application and look into your logs to identify the slow queries.

0 commit comments

Comments
 (0)