summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/log.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/log.js b/src/lib/log.js
index 0f12698..f548c49 100644
--- a/src/lib/log.js
+++ b/src/lib/log.js
@@ -1,13 +1,16 @@
{
let PREFIX = `[${browser.runtime.getManifest().name}]`;
+ let debugCount = 0;
function log(msg, ...rest) {
console.log(`${PREFIX} ${msg}`, ...rest);
}
+
function debug(msg, ...rest) {
- console.debug(`${PREFIX} ${msg}`, ...rest);
+ console.debug(`${PREFIX}:${debugCount++} ${msg}`, ...rest);
}
+
function error(e, msg, ...rest) {
console.error(`${PREFIX} ${msg}`, ...rest, e, e.message, e.stack);
}