Skip to content

Commit 651b7ff

Browse files
authored
Merge pull request #21 from YL20181120/master
显示当前查询的数据库
2 parents fb65b0d + 798c2fa commit 651b7ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ServiceProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ public function boot()
4242
if (count($bindings) > 0) {
4343
$realSql = vsprintf($sqlWithPlaceholders, array_map([$pdo, 'quote'], $bindings));
4444
}
45-
46-
Log::debug(sprintf('[%s] %s | %s: %s', $duration, $realSql, request()->method(), request()->getRequestUri()));
45+
Log::debug(sprintf('[%s] [%s] %s | %s: %s', $query->connection->getDatabaseName(), $duration, $realSql, request()->method(), request()->getRequestUri()));
4746
});
4847
}
4948

0 commit comments

Comments
 (0)