Update query log to be more useful
This commit is contained in:
parent
adcd4166c6
commit
02533addb4
|
@ -5,7 +5,7 @@ require_once __DIR__ . '/database.php';
|
||||||
define('VERSION', '1.2.5');
|
define('VERSION', '1.2.5');
|
||||||
define('BUILD', 'Reawaken');
|
define('BUILD', 'Reawaken');
|
||||||
define('START', microtime(true));
|
define('START', microtime(true));
|
||||||
define('DEBUG', true);
|
define('DEBUG', false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open or get SQLite database connection.
|
* Open or get SQLite database connection.
|
||||||
|
@ -213,7 +213,7 @@ function display($content, $title, bool $topnav = true, bool $leftnav = true, bo
|
||||||
"numqueries" => db()->count,
|
"numqueries" => db()->count,
|
||||||
"version" => VERSION,
|
"version" => VERSION,
|
||||||
"build" => BUILD,
|
"build" => BUILD,
|
||||||
"querylog" => DEBUG ? '<pre>'.print_r(db()->log, true).'</pre>' : ''
|
"querylog" => DEBUG ? db()->log : []
|
||||||
]);
|
]);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -39,7 +39,13 @@
|
||||||
<div>Version <?= $version ?> <?= $build ?></div>
|
<div>Version <?= $version ?> <?= $build ?></div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<?= $querylog ?>
|
<?php
|
||||||
|
if (!empty($querylog)) {
|
||||||
|
echo '<pre>';
|
||||||
|
foreach ($querylog as $record) echo '<div>['.round($record[1], 2)."s] {$record[0]}</div>";
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user