Mailing List Archive

[interchange] Improve some logging
commit e066d5c118ef84b5bde835f43b722b8797af061d
Author: Jon Jensen <jon@endpoint.com>
Date: Wed Feb 21 22:49:51 2018 -0700

Improve some logging

lib/Vend/Table/DBI.pm | 2 +-
lib/Vend/Table/DBI_CompositeKey.pm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/Vend/Table/DBI.pm b/lib/Vend/Table/DBI.pm
index 217932b..a408dda 100644
--- a/lib/Vend/Table/DBI.pm
+++ b/lib/Vend/Table/DBI.pm
@@ -1180,7 +1180,7 @@ sub alter_column {
};

if($@) {
- $s->log_error( "'%s' failed. Error: %s", $template,);
+ $s->log_error("'%s' failed. Error: %s", $template, $@);
return undef;
}

diff --git a/lib/Vend/Table/DBI_CompositeKey.pm b/lib/Vend/Table/DBI_CompositeKey.pm
index 2c510f3..896c813 100644
--- a/lib/Vend/Table/DBI_CompositeKey.pm
+++ b/lib/Vend/Table/DBI_CompositeKey.pm
@@ -446,7 +446,7 @@ sub set_slice {
}

#::logDebug("exists=$exists set_slice query: $sql");
-#::logDebug("set_slice key/fields/values:\nkey=$key\n" . ::uneval($fary, $vary));
+#::logDebug("set_slice key/fields/values:\n" . ::uneval($key, $fary, $vary));

my $val;
eval {
@@ -761,7 +761,7 @@ sub record_exists {
$status = defined $s->[$DBI]->selectrow_array($query, undef, @key);
};
if($@) {
- $s->log_error("Bad execution of record_exists query");
+ $s->log_error("Bad execution of record_exists query: $@");
return undef;
}
#::logDebug("record_exists status=$status");

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs