File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 55## Installing
66
77``` shell
8- $ composer require overtrue/laravel-query-logger --dev - vvv
8+ $ composer require overtrue/laravel-query-logger -vvv
99```
1010
1111Laravel Query Logger will be enabled when ` LOG_QUERY ` is ` true ` .
1212
13- > Please keep the ` --dev ` option.
14-
1513## Usage
1614
1715``` shell
@@ -26,15 +24,15 @@ $ tail -f ./storage/logs/laravel.log
2624
2725### Configuration
2826
29- If you want to use it in a environment, you can control whether to log a query via the configuration file:
27+ You can also control whether to log a query via the configuration file:
3028
3129* config/logging.php:*
3230
3331``` php
3432return [
3533 //...
3634 'query' => [
37- 'enabled' => env('LOG_QUERY', false ),
35+ 'enabled' => env('LOG_QUERY', env('APP_ENV') === 'local' ),
3836
3937 // Only record queries that are slower than the following time
4038 // Unit: milliseconds
You can’t perform that action at this time.
0 commit comments