Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 56145
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: REHSACK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.28
Fixed in: (no value)



Subject: To late error evaluation in Log::Log4perl::Appender::DBI
Hi Michael, in Log::Log4perl::Appender::DBI '$self->{dbh}->errstr()' will be appended to a message sent to the developer/user via croak(). This is to late, because $self->{dbh}->ping() will override previous error. Better to store the error when detected and append when ping is successful. Best regards, Jens
I tried it with mysql, but looks like ping() doesn't overwrite DBI::errstr, but I guess it's possible that it happens with other databases. This fix should take care of it: http://github.com/mschilli/log4perl/commit/b048baaac0de6b4a3c923402acf701544175a727 Thanks for your report.