DB\IO add stack trace to debug/error/warning calls

To add the actuall call reference for DB IO debug calls we add the
call trace as context options
This commit is contained in:
Clemens Schwaighofer
2023-06-16 13:16:16 +09:00
parent f83293ff1a
commit 7748b83a6b
4 changed files with 45 additions and 5 deletions

View File

@@ -53,6 +53,18 @@ if (($dbh = $db->dbGetDbh()) instanceof \PgSql\Connection) {
print "NO DB HANDLER<br>";
}
/**
* Undocumented function
*
* @param \CoreLibs\DB\IO $dbc
* @return void
*/
function testDBS(\CoreLibs\DB\IO $dbc): void
{
echo "Int call<br>";
$dbc->dbReturnRow("SELECT test FROM test_foo LIMIT 1");
}
$uniqid = \CoreLibs\Create\Uids::uniqIdShort();
$binary_data = $db->dbEscapeBytea(file_get_contents('class_test.db.php') ?: '');
$query_params = [
@@ -110,6 +122,8 @@ if (is_array($res)) {
var_dump($res);
}
testDBS($db);
print "</body></html>";
// __END__