Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-895

Improved log() function to handle "undefined" as well as object's of type "xml"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.11.1, 0.11.2, 1.0, 1.0.1
    • 1.0.2, 1.1
    • JavaScript View Server
    • None
    • New Contributors Level (Easy)

    Description

      Currently (1.0.1 and below), if you try log(undefined) in a map/reduce or other JS function in CouchDB, you'll get a rather verbose stack trace. This patch casts the message var as a String to avoid that stack trace and output the text representation of "undefined".

      Additionally, this patch includes outputting XML objects (build with E4X: new XML('<test />')) as string representations of the entire XML (using toXMLString()).

      Attachments

        1. log_improvements.diff
          0.5 kB
          Benjamin Young

        Activity

          People

            Unassigned Unassigned
            bigbluehat Benjamin Young
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: