Browse files

More specific debug logging

  • Loading branch information...
1 parent 8203fa1 commit 190d8f0c648f58f1fb6a7758ec2e7cab9e73be5a @temas temas committed Mar 20, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 Common/node/ijod.js
View
8 Common/node/ijod.js
@@ -65,7 +65,7 @@ exports.IJOD = IJOD;
IJOD.prototype.startAddTransaction = function(cbDone) {
if (this.transactionItems) return cbDone();
this.transactionItems = [];
- console.log("****************************** BEGIN TRANSACTION in normal");
+ console.log("****************************** BEGIN TRANSACTION in normal " + this.name);
this.db.execute("BEGIN TRANSACTION", function(error, rows) { cbDone(); });
};
@@ -90,7 +90,7 @@ IJOD.prototype.commitAddTransaction = function(cbDone) {
} else if (written != totalSize) {
console.error("Only %d written of %d bytes to IJOD", written, totalSize);
}
- console.log("****************************** COMMIT TRANSACTION in normal");
+ console.log("****************************** COMMIT TRANSACTION in normal " + this.name);
self.db.execute("COMMIT TRANSACTION", function(error, rows) { cbDone(); });
});
});
@@ -243,7 +243,7 @@ IJOD.prototype.batchSmartAdd = function(entries, callback) {
}
var script = ["CREATE TEMP TABLE IF NOT EXISTS batchSmartAdd (id TEXT)", "DELETE FROM batchSmartAdd", "BEGIN TRANSACTION"].join(";") + ";";
- console.log("****************************** BEGIN TRANSACTION in batch");
+ console.log("****************************** BEGIN TRANSACTION in batch " + this.name);
self.db.executeScript(script, function(error, rows) {
if (error) return handleError(error);
self.db.prepare("INSERT INTO batchSmartAdd VALUES (?)", function(error, stmt) {
@@ -260,7 +260,7 @@ IJOD.prototype.batchSmartAdd = function(entries, callback) {
});
}, function(error) {
if (error) return handleError(error);
- console.log("****************************** COMMIT TRANSACTION in batch");
+ console.log("****************************** COMMIT TRANSACTION in batch " + this.name);
self.db.execute("COMMIT TRANSACTION", function(error, rows) {
if (error) return handleError(error);
stmt.finalize(function(error) {

0 comments on commit 190d8f0

Please sign in to comment.