From f73888db8615c93112b46e8d9dbc63b243c4f40e Mon Sep 17 00:00:00 2001 From: Vitaly Tomilov Date: Sat, 12 Sep 2015 02:56:18 +0100 Subject: [PATCH] fixing error task parameters. --- lib/index.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 5abdc04..5a08ec1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -172,11 +172,11 @@ var monitor = { } else { if (e.ctx && (monitor.detailed || detailed)) { // transaction details are to be reported; - var sTag = getTagName(e); + var sTag = getTagName(e), prefix = e.ctx.isTX ? "tx" : "task"; if (sTag) { - print(event, timeGap + cct.paramTitle("tx(") + cct.value(sTag) + cct.paramTitle("): ") + cct.value(q), true); + print(event, timeGap + cct.paramTitle(prefix + "(") + cct.value(sTag) + cct.paramTitle("): ") + cct.value(q), true); } else { - print(event, timeGap + cct.paramTitle("tx: ") + cct.value(q), true); + print(event, timeGap + cct.paramTitle(prefix + ": ") + cct.value(q), true); } } else { print(event, timeGap + cct.paramTitle("query: ") + cct.value(q), true); diff --git a/package.json b/package.json index d66d667..41f0129 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pg-monitor", - "version": "0.3.0", + "version": "0.3.1", "description": "Event monitor for pg-promise.", "main": "lib/index.js", "homepage": "https://github.com/vitaly-t/pg-monitor",