1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #7381 from turbo124/v5-develop

fixes for query logging
This commit is contained in:
David Bomba 2022-04-20 12:08:08 +09:30 committed by GitHub
commit 36a5f6b8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,9 +35,9 @@ class QueryLogging
{
// Enable query logging for development
// if (!Ninja::isHosted() || !config('beacon.enabled')) {
// return $next($request);
// }
if (!Ninja::isHosted() || !config('beacon.enabled')) {
return $next($request);
}
$timeStart = microtime(true);
DB::enableQueryLog();
@ -52,12 +52,11 @@ class QueryLogging
$time = $timeEnd - $timeStart;
// info("Query count = {$count}");
$url = urldecode($request->url());
$method = $request->method();
// if($count > 175){
nlog("Query count = {$count} - {$method} - {$url} ");
// nlog($queries);
// }
if($count > 175){
nlog("Query count = {$count}");
nlog($queries);
}
$ip = '';