summaryrefslogtreecommitdiffstats
path: root/js/dav/lib/debug.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dav/lib/debug.js')
-rw-r--r--js/dav/lib/debug.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/dav/lib/debug.js b/js/dav/lib/debug.js
new file mode 100644
index 00000000..afbd6ee6
--- /dev/null
+++ b/js/dav/lib/debug.js
@@ -0,0 +1,7 @@
+export default function debug(topic) {
+ return function(message) {
+ if (debug.enabled) {
+ console.log(`[${topic}] ${message}`);
+ }
+ };
+}