Skip to content

Commit 9aef8bf

Browse files
authored
Merge pull request #23 from maxlcoder/master
更新开启配置到单独的配置项
2 parents 651b7ff + 1850047 commit 9aef8bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$ composer require overtrue/laravel-query-logger --dev -vvv
99
```
1010

11-
Laravel Query Logger will be enabled when `APP_DEBUG` is `true`.
11+
Laravel Query Logger will be enabled when `LOG_QUERY` is `true`.
1212

1313
> Please keep the `--dev` option.
1414
@@ -26,7 +26,7 @@ $ tail -f ./storage/logs/laravel.log
2626

2727
### Configuration
2828

29-
If you want to use it in a production environment, you can control whether or not to log a query via the configuration file:
29+
If you want to use it in a environment, you can control whether or not to log a query via the configuration file:
3030

3131
*config/logging.php:*
3232

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ServiceProvider extends LaravelServiceProvider
2323
*/
2424
public function boot()
2525
{
26-
if (!$this->app['config']->get('app.debug') && !$this->app['config']->get('logging.query.enabled', false)) {
26+
if (!$this->app['config']->get('logging.query.enabled', false)) {
2727
return;
2828
}
2929

0 commit comments

Comments
 (0)