diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | share/server/main.js | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -6,6 +6,7 @@ and a number of other contributors. Many people further contributed to Apache CouchDB by reporting problems, suggesting various improvements or submitting changes. A list of these people is included below. + * Chris Anderson <jchris@grabb.it> * William Beh <willbeh@gmail.com> * Benoit Chesneau <bchesneau@gmail.com> * Till Klampaeckel <till@klampaeckel.de> 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: |