escape double quotes \" when printing strings to log

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Logging, Usability
    • Server Security
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 ...
      

              Assignee:
              [DO NOT USE] Backlog - Security Team
              Reporter:
              Thomas Rueckstiess (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: