Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-96943 Convert log-printing functions in mongo (legacy) shell to JSON format
  3. SERVER-100169

Replace print(tojson(someVarName)) with jsTest.log.info({someVarName}) in JS tests

    • Type: Icon: Sub-task Sub-task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2025-01-20, QE 2025-02-03, QE 2025-02-17, QE 2025-03-03
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This should produce a log entry

      {
       "t": ....,
       "s":"I",
       "ctx": "js_test",
       "msg": "",
       "attr": {
          "someVarName": {...}
        }
      }
      

      Options:

      • jsTest.log.info( {someVarName}); // with some sugar
        - jsTest.log.info("", {someVarName}

        ); // without sugar

            Assignee:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None