66
77namespace pmapi
88{
9- // DiagnosticHandler is simplifies the process of setting up the debug diagnostic layer
9+ // DiagnosticHandler simplifies the process of setting up the debug diagnostic layer
1010 // when you supply a callback, this class will spawn a thread to process messages from
1111 // the diagnostic queue (sleeping while none are available)
1212 // make sure that any resources accessed by this callback are done so in a thread-safe manner
@@ -21,16 +21,16 @@ namespace pmapi
2121 int outputFlags = PM_DIAGNOSTIC_OUTPUT_FLAGS_DEBUGGER,
2222 // callback that will process messages received into the queue
2323 std::function<void (const PM_DIAGNOSTIC_MESSAGE&)> callback = {},
24+ // add a grace period to wait for final messages before destroying diagnostics (ms)
25+ int gracePeriodMs = 10 ,
2426 // span of subsystems to allow, ignore all not in this span (empty span to accept all)
2527 std::span<PM_DIAGNOSTIC_SUBSYSTEM> allowList = {},
2628 // capture timestamps as a string and add to all non-queue outputs
2729 bool enableTimestamp = true ,
2830 // capture stack traces as a string when available (typically for error-level messages)
2931 bool enableTrace = false ,
3032 // capture source file and line number as a string
31- bool enableLocation = false ,
32- // add a grace period to wait for final messages before destroying diagnostics (ms)
33- int gracePeriodMs = 50
33+ bool enableLocation = false
3434 );
3535 ~DiagnosticHandler ();
3636 private:
0 commit comments