less whitespace in logs
This commit is contained in:
parent
78dbcb8626
commit
09723bbcb9
1 changed files with 4 additions and 1 deletions
|
@ -130,7 +130,10 @@ class Database
|
|||
{
|
||||
global $_tracer, $tracer_enabled;
|
||||
$dur = ftime() - $start;
|
||||
$query = trim(preg_replace('/^[\n\t ]+/m', '', $query)); // trim whitespace
|
||||
// trim whitespace
|
||||
$query = preg_replace('/[\n\t ]/m', ' ', $query);
|
||||
$query = preg_replace('/ +/m', ' ', $query);
|
||||
$query = trim($query);
|
||||
if ($tracer_enabled) {
|
||||
$_tracer->complete($start * 1000000, $dur * 1000000, "DB Query", ["query"=>$query, "args"=>$args, "method"=>$method]);
|
||||
}
|
||||
|
|
Reference in a new issue