Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

JavaScript-Funktionen > void log(message)

void log(message)

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

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial