ReXGlue SDK
Loading...
Searching...
No Matches
rex::log::LogCaptureSink Class Referencefinal

#include <rex/logging/logger.h>

Inheritance diagram for rex::log::LogCaptureSink:
[legend]

Public Member Functions

void Write (const Message &message) override
void Flush () override
u64 CopySince (u64 after, std::vector< CapturedMessage > &out) const
u64 GetLatestSequence () const

Static Public Attributes

static constexpr size_t kCapacity = 4096

Additional Inherited Members

Protected Member Functions inherited from rex::NonCopyable
 NonCopyable (const NonCopyable &)=delete
NonCopyable & operator= (const NonCopyable &)=delete

Detailed Description

Keeps the newest messages in memory for the console. Safe to read from any thread.

Member Function Documentation

◆ CopySince()

u64 rex::log::LogCaptureSink::CopySince ( u64 after,
std::vector< CapturedMessage > & out ) const

Copies the messages newer than a sequence, oldest first.

Parameters
afterSequence of the newest message the caller holds, 0 for all.
outReceives the messages. Cleared first.
Returns
The sequence of the newest message kept, or after when nothing is newer.

◆ Flush()

void rex::log::LogCaptureSink::Flush ( )
overridevirtual

Does nothing, the messages are in memory.

Implements rex::log::ILogSink.

◆ GetLatestSequence()

u64 rex::log::LogCaptureSink::GetLatestSequence ( ) const

Returns the sequence of the newest message kept, 0 before the first message.

◆ Write()

void rex::log::LogCaptureSink::Write ( const Message & message)
overridevirtual

Keeps a message, discarding the oldest at capacity.

Implements rex::log::ILogSink.


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