Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Diese Funktion ist überall verfügbar. Damit können Sie Logeinträge vornehmen. Der Parameter message kann dabei jeder Typ sein. Wenn der Parameter message kein String ist, wird der übergebene Wert intern in ein JSON-String umgewandelt, z.B. so:
function(doc) {
if (doc._attachments) {
emit(doc._id, null);
}
else {
log("There are no attachments for the document:"+doc._id);
}
}
Der entsprechende Logeintrag wird in der Datei /var/log/couchdb/couch.log –angelegt, z.B. so:
[Thu, 03 Dec 2009 22:46:36 GMT] [info] [<0.62.0>] There are noe attachments for the document: 123