This repository was archived by the owner on Feb 28, 2023. It is now read-only.
File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
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
- Add to ` providers ` in ` config/app.php ` :
11
+ In old Laravel you need to add to ` providers ` in ` config/app.php ` :
12
12
13
13
```
14
14
Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider::class,
@@ -19,11 +19,9 @@ Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider::class,
19
19
Add to your composer.json following lines
20
20
21
21
"require": {
22
- "rokde/laravel-slow-query-logger": "~0.0 "
22
+ "rokde/laravel-slow-query-logger": "^1.* "
23
23
}
24
24
25
- Add ` Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider::class, ` to ` providers ` in ` config/app.php ` .
26
-
27
25
Run ` php artisan vendor:publish --provider="Rokde\LaravelSlowQueryLogger\LaravelSlowQueryLoggerProvider" `
28
26
29
27
## Configuration
@@ -32,14 +30,20 @@ Run `php artisan vendor:publish --provider="Rokde\LaravelSlowQueryLogger\Laravel
32
30
33
31
Only log queries longer than this value in microseconds.
34
32
35
- ### ` environments `
33
+ You can set this value through environment variable ` LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG ` .
34
+
35
+ ### ` enabled `
36
36
37
- Set the enabled environments to log slow queries.
37
+ Enable the slow queries logger.
38
+
39
+ You can set this value through environment variable ` LARAVEL_SLOW_QUERY_LOGGER_ENABLED ` .
38
40
39
41
### ` log-level `
40
42
41
43
Set the log-level for logging the slow queries.
42
44
45
+ You can set this value through environment variable ` LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL ` .
46
+
43
47
## Usage
44
48
45
49
Nothing to do after adding to ` /config/app.php ` . Watch your logs.
You can’t perform that action at this time.
0 commit comments