summaryrefslogtreecommitdiff
path: root/share/server
diff options
context:
space:
mode:
Diffstat (limited to 'share/server')
-rw-r--r--share/server/main.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/share/server/main.js b/share/server/main.js
index a62ed1ff..7fe08608 100644
--- a/share/server/main.js
+++ b/share/server/main.js
@@ -28,11 +28,16 @@ sum = function(values) {
return rv;
}
+log = function(message) {
+ print(toJSON({log: toJSON(message)}));
+}
+
try {
// if possible, use evalcx (not always available)
sandbox = evalcx('');
sandbox.emit = emit;
sandbox.sum = sum;
+ sandbox.log = log;
} catch (e) {}
// Commands are in the form of json arrays: