Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ProcessCommunicatorTracePrinter Class Reference

#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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ProcessCommunicatorTracePrinter()

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.

Member Function Documentation

◆ Flush()

void ProcessCommunicatorTracePrinter::Flush ( )

Output any remaining data that exists. If using threaded trace printing, the pump thread will continue to run after calling this.

◆ Pump()

void ProcessCommunicatorTracePrinter::Pump ( )

Call this periodically to drain the buffers and write them. If using threaded trace printing, this should not get called


The documentation for this class was generated from the following file: