• Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-01-20, QE 2025-02-03, QE 2025-02-17, QE 2025-03-03
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Convert our logging function to print the logs in JSON format, if given enabled via resmoke flags. The format should be similar to our C++ logs:

      {
      "t": <Datetime>, // timestamp
      "s": <String>, // severity - E(rror), W(arning), I(nfo), D(ebug)
      "c": "js_test", // component
      "id": <Integer>, // unique identifier - 9694300
      "ctx": <String>, // context (e.g., TestData.testName)
      "msg": <String>, // message body
      "attr": <Object>, // additional attributes (optional)
      "tags": <Array of strings>, // tags (optional)
      "truncated": <Object>, // truncation info (if truncated)
      "size": <Object> // original size of entry (if truncated)
      }

      Using the new format, instead of the old format: 

      jsTest.log("Change event = " + tojson(event) + " last oplog entry = " + tojson(oplogEntry));
      

      we will use the new format

      jsTest.log("Change stream status before topology change", attr: {lastChangeEvent: event, lastOplogEntry: oplogEntry});

            Assignee:
            victorfilip.ghita@mongodb.com Victor Ghita
            Reporter:
            victorfilip.ghita@mongodb.com Victor Ghita
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None