Log only errors.
authorDavid E. Wheeler <david@justatheory.com>
Mon, 7 Oct 2013 16:20:29 +0000 (09:20 -0700)
committerDavid E. Wheeler <david@justatheory.com>
Mon, 7 Oct 2013 16:20:29 +0000 (09:20 -0700)
Bucardo.pm

index 45dcdfa068bc258f75a0e757c113754f326a294e..b00b8b811db8e60974b0d62836b0dff4cb26d0e8 100644 (file)
@@ -4810,6 +4810,16 @@ sub start_kid {
             $err_handler->($err);
         }
 
+        if ($config{log_level_number} >= LOG_DEBUG) {
+            ## Show complete error information in debug mode.
+            for my $dbh (grep { $dbh->err } map { $sync->{db}{$_}{dbh} } @dbs_dbi) {
+                $self->glog(
+                    sprintf('*  %s: %s - %s', $dbh->{Name}, $dbh->state, $dbh->errstr),
+                    LOG_DEBUG
+                );
+            }
+        }
+
         ## Roll everyone back
         for my $dbname (@dbs_dbi) {
             my $dbh = $sync->{db}{$dbname}{dbh};