promote mongo::unittest::Test log capture functions to be nonmembers

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • Fully Compatible
    • Programmability 2025-08-18, Programmability 2025-09-01
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      These are currently implemented as members of Test, but they only manipulate a static singleton CaptureLogs object.

      We should make these functions available as nonmember functions in mongo::unittest and change all callers to use the unittest:: qualified name.

      The ~Test() destructor stops log capturing after a test finishes and is being destroyed. The same effect can be achieved through an RAII object usable by any test that wants to use it.

      This is important for Gtest migration SPM-2926 as there, we aren't always using a base Test class that we control.

            Assignee:
            Billy Donahue
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: