Radix Relay
Hybrid mesh communications with Signal Protocol encryption
Loading...
Searching...
No Matches
radix_relay::cli_utils::tui_sink< Mutex > Class Template Referencefinal

Custom spdlog sink that routes log messages to a display queue. More...

#include <tui_sink.hpp>

Inheritance diagram for radix_relay::cli_utils::tui_sink< Mutex >:

Public Member Functions

 tui_sink (std::shared_ptr< async::async_queue< core::events::display_filter_input_t > > queue)
 Constructs a TUI sink with the given display queue.
 

Protected Member Functions

auto sink_it_ (const spdlog::details::log_msg &msg) -> void override
 Formats and queues a log message.
 
auto flush_ () -> void override
 Flushes pending log messages (no-op for queue-based sink).
 

Detailed Description

template<typename Mutex>
class radix_relay::cli_utils::tui_sink< Mutex >

Custom spdlog sink that routes log messages to a display queue.

Template Parameters
MutexMutex type for thread safety (e.g., std::mutex)

Formats log messages and pushes them to an async queue for display in the TUI.

Definition at line 19 of file tui_sink.hpp.

Constructor & Destructor Documentation

◆ tui_sink()

template<typename Mutex >
radix_relay::cli_utils::tui_sink< Mutex >::tui_sink ( std::shared_ptr< async::async_queue< core::events::display_filter_input_t > >  queue)
inlineexplicit

Constructs a TUI sink with the given display queue.

Parameters
queueQueue for outgoing display messages

Definition at line 27 of file tui_sink.hpp.

Member Function Documentation

◆ flush_()

template<typename Mutex >
auto radix_relay::cli_utils::tui_sink< Mutex >::flush_ ( ) -> void
inlineoverrideprotected

Flushes pending log messages (no-op for queue-based sink).

Definition at line 56 of file tui_sink.hpp.

◆ sink_it_()

template<typename Mutex >
auto radix_relay::cli_utils::tui_sink< Mutex >::sink_it_ ( const spdlog::details::log_msg &  msg) -> void
inlineoverrideprotected

Formats and queues a log message.

Parameters
msgLog message from spdlog

Definition at line 37 of file tui_sink.hpp.

References radix_relay::platform::current_timestamp_ms(), radix_relay::core::events::display_message::message, and radix_relay::core::events::display_message::system.


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