兼容sql function
This commit is contained in:
parent
211ff1de4a
commit
c743240d63
|
@ -35,7 +35,8 @@ class QueryListener
|
|||
{
|
||||
if (env('APP_DEBUG')) {
|
||||
$sql = str_replace("?", "'%s'", $event->sql);
|
||||
$this->logger->debug(vsprintf($sql, $event->bindings), ['conn' => $event->connectionName, 'time' => $event->time.'ms']);
|
||||
$log = $event->bindings ? vsprintf($sql, $event->bindings) : $sql;
|
||||
$this->logger->debug($log, ['conn' => $event->connectionName, 'time' => $event->time.'ms']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user