This repository was archived by the owner on Feb 28, 2023. It is now read-only.
File tree 1 file changed +15
-13
lines changed
1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 8
8
composer require rokde/laravel-slow-query-logger
9
9
```
10
10
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.
16
12
17
13
## Installation
18
14
@@ -26,24 +22,30 @@ Run `php artisan vendor:publish --provider="Rokde\LaravelSlowQueryLogger\Laravel
26
22
27
23
## Configuration
28
24
29
- ### ` time-to-log `
25
+ ### ` enabled `
30
26
31
- Only log queries longer than this value in microseconds .
27
+ Enable the slow queries logger .
32
28
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 .
34
30
35
- ### ` enabled `
31
+ ### ` channel `
36
32
37
- Enable the slow queries logger .
33
+ Sets the channel to log in .
38
34
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 .
40
36
41
37
### ` log-level `
42
38
43
39
Set the log-level for logging the slow queries.
44
40
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.
46
48
47
49
## Usage
48
50
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 .
You can’t perform that action at this time.
0 commit comments