diff --git a/src/Listeners/QueryListener.php b/src/Listeners/QueryListener.php index f83f7b4..4fbf625 100644 --- a/src/Listeners/QueryListener.php +++ b/src/Listeners/QueryListener.php @@ -9,6 +9,9 @@ use Monolog\Logger; class QueryListener { + + protected $logger; + /** * Create the event listener. * @@ -34,7 +37,7 @@ class QueryListener if (env('APP_DEBUG')) { $sql = str_replace("?", "'%s'", $event->sql); $log = vsprintf($sql, $event->bindings); - $this->logger->info($log); + $this->logger->info($log, ['conn' => $event->connectionName, 'time' => $event->time]); } }