summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/log.ls
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common/scripts/log.ls')
-rw-r--r--src/web/app/common/scripts/log.ls18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/log.ls b/src/web/app/common/scripts/log.ls
new file mode 100644
index 0000000000..6e1e3735d8
--- /dev/null
+++ b/src/web/app/common/scripts/log.ls
@@ -0,0 +1,18 @@
+riot = require \riot
+
+logs = []
+
+ev = riot.observable!
+
+function log(msg)
+ logs.push do
+ date: new Date!
+ message: msg
+ ev.trigger \log
+
+riot.mixin \log do
+ logs: logs
+ log: log
+ log-event: ev
+
+module.exports = log