Improve logging in FSM suites

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • Repl 2023-10-16
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Debugging can be hard in FSM suites since it is difficult to track the progress a specific thread is making. It would be helpful if the current thread ID was logged automatically in the message for fsm workloads

       

      SERVER-32095 already includes the tid in calls to print which jsTestLog uses, but since jsTestLog adds newlines in the thread ID gets separated from the actual log message, meaning that doing jsTestLog("Example log line") in thread 11 will result in

      [tid:11]
      
      [jsTest] ----
      Example log line
      [jsTest] ----

      It would be ideal if the thread ID was included in the actual logged message, something like

      [jsTest] ----
      [tid:11] Example log line
      [jsTest] ---- 

      This can likely be achieved by worker_thread.js overriding jsTestLog function to include the ID into each message line

            Assignee:
            Sean Zimmerman
            Reporter:
            Sean Zimmerman
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: