CouchDB
  1. CouchDB
  2. COUCHDB-895

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11.1, 0.11.2, 1.0, 1.0.1
    • Fix Version/s: 1.0.2, 1.1
    • Component/s: JavaScript View Server
    • Labels:
      None
    • Skill Level:
      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()).

      1. log_improvements.diff
        0.5 kB
        Benjamin Young

        Activity

        Benjamin Young created issue -
        Benjamin Young made changes -
        Field Original Value New Value
        Attachment log_improvements.diff [ 12455745 ]
        Paul Joseph Davis made changes -
        Skill Level New Contributors Level (Easy)
        Jan Lehnardt made changes -
        Fix Version/s 1.1 [ 12314933 ]
        Jan Lehnardt made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        48d 4h 19m 1 Jan Lehnardt 15/Nov/10 00:07

          People

          • Assignee:
            Unassigned
            Reporter:
            Benjamin Young
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development