ADD: added some debug logging

This commit is contained in:
Dominik Meyer 2023-12-26 16:55:41 +01:00
parent 7fb5b3df28
commit dde0e7ea9d
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97
1 changed files with 5 additions and 2 deletions

View File

@ -37,7 +37,8 @@ sub createDSN
my $dsn = "DBI:MariaDB:database=" . $self->{database} . ";host=" . $self->{host} . ";port=" . $self->{port};
$self->{dsn} = $dsn;
$self->log(LOGDEBUG, "created DSN " . $self->{DSN});
}
sub createQuery
@ -71,6 +72,7 @@ sub createQuery
$self->{sqlquery}=$query;
$self->log(LOGDEBUG, "created query " . $self->{sqlquery});
}
sub prepareParams
@ -104,6 +106,7 @@ sub parseConfig
for my $line (@config)
{
$self->log(LOGDEBUG, "config line " . $line);
my @value = split /:=/, $line;
my $key = lc($value[0]);
@ -176,7 +179,7 @@ sub askDatabase
{
my $self = shift;
my $recipient = shift;
my $dbh = DBI::connect($self->{dsn}, $self->{user}, $self->{pass},{ RaiseError => 0, PrintError => 0 });
my $dbh = DBI::connect($self->{dsn}, $self->{user}, $self->{pass});
if ($dbh->err())
{