#include <ComposableCameraLogCapture.h>
Inherits:
FOutputDevice
Output device that watches GLog for warnings and errors emitted on any LogComposableCamera* log category and keeps the most recent N in a ring buffer for the debug panel's Warnings region to display.
Why this is needed: several non-fatal error paths in the runtime (running-camera null, referenced-director destroyed mid-blend, spline transition missing its rail actor, etc.) emit UE_LOG(..., Error, ...) but are only visible in Output Log. Users running PIE without Output Log open would miss them entirely. Mirroring them into the panel surfaces the signal in the same place the rest of the debug state lives.
Thread safety: Serialize is called from whichever thread did the UE_LOG. The ring buffer is guarded by a CriticalSection, so the panel's game-thread read and any worker-thread write serialize cleanly. Capacity is small (16) so the critical section is never held long enough to matter.
Compiled out in shipping builds — both Install/Uninstall and the accessor are #if !UE_BUILD_SHIPPING, so shipping games pay zero cost (no output device registered, no ring buffer memory, no lock).
Public Methods¶
| Return | Name | Description |
|---|---|---|
void |
Serialize virtual |
|
bool |
CanBeUsedOnAnyThread virtual const inline |
|
bool |
CanBeUsedOnMultipleThreads virtual const inline |
Serialize¶
virtual
virtual void Serialize(const TCHAR * V, ELogVerbosity::Type Verbosity, const FName & Category)
CanBeUsedOnAnyThread¶
virtual const inline
virtual inline bool CanBeUsedOnAnyThread() const
CanBeUsedOnMultipleThreads¶
virtual const inline
virtual inline bool CanBeUsedOnMultipleThreads() const
Public Static Attributes¶
| Return | Name | Description |
|---|---|---|
constexpr int32 |
MaxCapturedEntries static |
Max entries the ring buffer keeps. Older entries overflow off the front. Exposed so the panel's height pass can reserve rows up front. |
MaxCapturedEntries¶
static
constexpr int32 MaxCapturedEntries = 16
Max entries the ring buffer keeps. Older entries overflow off the front. Exposed so the panel's height pass can reserve rows up front.
Public Static Methods¶
| Return | Name | Description |
|---|---|---|
void |
Install static |
Register with GLog. Idempotent — calling twice is a no-op. |
void |
Uninstall static |
Unregister from GLog and clear the ring buffer. Idempotent. |
void |
GetRecentEntries static |
Copy the current ring-buffer contents into OutEntries, oldest first. Safe to call from any thread; blocks briefly on the ring-buffer critical section but never for more than a few μs. |
Install¶
static
static void Install()
Register with GLog. Idempotent — calling twice is a no-op.
Uninstall¶
static
static void Uninstall()
Unregister from GLog and clear the ring buffer. Idempotent.
GetRecentEntries¶
static
static void GetRecentEntries(TArray< FComposableCameraLogEntry > & OutEntries)
Copy the current ring-buffer contents into OutEntries, oldest first. Safe to call from any thread; blocks briefly on the ring-buffer critical section but never for more than a few μs.
Private Attributes¶
| Return | Name | Description |
|---|---|---|
TArray< FComposableCameraLogEntry > |
RingBuffer |
|
FCriticalSection |
BufferCS |
|
bool |
bInstalled |
RingBuffer¶
TArray< FComposableCameraLogEntry > RingBuffer
BufferCS¶
FCriticalSection BufferCS
bInstalled¶
bool bInstalled = false
Private Static Methods¶
| Return | Name | Description |
|---|---|---|
FComposableCameraLogCapture & |
Get static |
Returns the shared singleton instance — keyed off static local so the first call installs and lifetime ends with module shutdown. Not exposed publicly: everything users want goes through the static Install / Uninstall / GetRecentEntries surface above. |
Get¶
static
static FComposableCameraLogCapture & Get()
Returns the shared singleton instance — keyed off static local so the first call installs and lifetime ends with module shutdown. Not exposed publicly: everything users want goes through the static Install / Uninstall / GetRecentEntries surface above.