Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16620

escape double quotes \" when printing strings to log

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Logging, Usability
    • Labels:

      Description

      A query like this:

      db.foo.find({a: "\"i'm a quoted text\""})

      is printed to the log file like so:

      2014-12-21T15:43:14.894+1100 I QUERY    [conn5] query test.foo query: { a: ""i'm a quoted text"" } planSummary: EOF ...

      The inner quotes are not escaped. This makes parsing this string with json/javascript parsers impossible.

      Instead, it should be printed like so:

      2014-12-21T15:43:14.894+1100 I QUERY    [conn5] query test.foo query: { a: "\"i'm a quoted text\"" } planSummary: EOF ...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-devtools Backlog - Dev Tools
              Reporter:
              thomasr Thomas Rueckstiess
              Participants:
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated: