Open 3D Engine AzFramework API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <ProcessCommunicatorTracePrinter.h>
Public Types | |
enum class | TraceProcessing { Poll , Threaded } |
Public Member Functions | |
ProcessCommunicatorTracePrinter (AzFramework::ProcessCommunicator *communicator, const char *window, TraceProcessing processingType=TraceProcessing::Poll) | |
void | Pump () |
void | Flush () |
ProcessCommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system Importantly, it does not do any blocking operations.
ProcessCommunicatorTracePrinter::ProcessCommunicatorTracePrinter | ( | AzFramework::ProcessCommunicator * | communicator, |
const char * | window, | ||
TraceProcessing | processingType = TraceProcessing::Poll |
||
) |
Wraps a ProcessCommunicatorTracePrinter around an existing ProcessCommunicator, which it will then invoke to read from stdout/stderr. Because it is going to invoke functions on the given ProcessCommuncator which you pass in, it is important that the 'communicator' you pass in is only destroyed after you destroyProcessCommunicatorTracePrinter.
void ProcessCommunicatorTracePrinter::Flush | ( | ) |
Output any remaining data that exists. If using threaded trace printing, the pump thread will continue to run after calling this.
void ProcessCommunicatorTracePrinter::Pump | ( | ) |
Call this periodically to drain the buffers and write them. If using threaded trace printing, this should not get called