Add debugging to zmDbDo

This commit is contained in:
Isaac Connor 2022-01-11 12:43:42 -05:00
parent 152efd0987
commit 9243b1d081
1 changed files with 3 additions and 0 deletions

View File

@ -273,6 +273,9 @@ sub zmDbDo {
if ( ! defined $rows ) { if ( ! defined $rows ) {
$sql =~ s/\?/'%s'/; $sql =~ s/\?/'%s'/;
Error(sprintf("Failed $sql :", @_).$dbh->errstr()); Error(sprintf("Failed $sql :", @_).$dbh->errstr());
} elsif ( ZoneMinder::Logger::logLevel() > INFO ) {
$sql =~ s/\?/'%s'/;
Debug(sprintf("Failed $sql :", @_).$dbh->errstr());
} }
return $rows; return $rows;
} }