LogIt++
Header-only, macro-first C++ logging library
Loading...
Searching...
No Matches
logit::MdbxLogger Class Referencefinal

Stores formatted logs in MDBX tables with optional async batching. More...

#include <MdbxLogger.hpp>

Inheritance diagram for logit::MdbxLogger:
logit::ILogger logit::ILogReader logit::ILogSubscriber

Classes

struct  Config
 Configuration for the MDBX logger backend. More...
 
struct  MdbxLogItem
 
struct  Payload
 
struct  PayloadView
 Public read-only view of a large payload. More...
 
struct  Record
 
struct  Session
 
struct  SessionView
 Public read-only view of session metadata. More...
 

Public Member Functions

 MdbxLogger ()
 
 MdbxLogger (const Config &config)
 
 ~MdbxLogger () override
 
 MdbxLogger (const MdbxLogger &)=delete
 
MdbxLogger & operator= (const MdbxLogger &)=delete
 
void log (const LogRecord &record, const std::string &message) override
 Queues or writes a formatted log record.
 
void wait () override
 Waits until accepted async records are written.
 
void shutdown () override
 Stops the worker after draining accepted records.
 
uint64_t session_id () const
 Returns this logger session id.
 
std::vector< LogRecordSnapshot > read_range (int64_t from_ms, int64_t to_ms, std::size_t limit=0) const override
 Reads records in [from_ms, to_ms) ordered by timestamp and sequence.
 
LogReadResult< std::vector< LogRecordSnapshot > > read_range_result (int64_t from_ms, int64_t to_ms, std::size_t limit=0) const override
 Reads records and preserves storage/decode errors.
 
std::vector< LogRecordSnapshot > read_recent (std::size_t limit, int64_t period_ms=0, LogReadOrder order=LogReadOrder::Ascending) const override
 Reads the most recent records.
 
LogReadResult< std::vector< LogRecordSnapshot > > read_recent_result (std::size_t limit, int64_t period_ms=0, LogReadOrder order=LogReadOrder::Ascending) const override
 Reads the most recent records and preserves storage/decode errors.
 
std::optional< PayloadView > read_payload (uint64_t payload_id) const
 Reads a payload by id.
 
LogReadResult< PayloadView > read_payload_result (uint64_t payload_id) const
 Reads a payload by id and preserves storage/decode errors.
 
std::optional< std::string > read_payload_data (uint64_t payload_id) const
 Reads and decompresses payload data by id.
 
LogReadResult< std::string > read_payload_data_result (uint64_t payload_id) const
 Reads and decompresses payload data while preserving failure details.
 
std::optional< SessionView > read_session (uint64_t session_id) const
 Reads session metadata by id.
 
LogReadResult< SessionView > read_session_result (uint64_t session_id) const
 Reads session metadata by id and preserves storage/decode errors.
 
std::string get_string_param (const LoggerParam &param) const override
 Retrieves a string parameter from the logger.
 
int64_t get_int_param (const LoggerParam &param) const override
 Retrieves an integer parameter from the logger.
 
double get_float_param (const LoggerParam &param) const override
 Retrieves a floating-point parameter from the logger.
 
void set_log_level (LogLevel level) override
 Sets the minimal log level for this logger.
 
LogLevel get_log_level () const override
 Gets the minimal log level for this logger.
 
LogClearResult clear_logs (const LogClearOptions &options=LogClearOptions()) override
 Clears logger-owned buffered or persisted records when supported.
 
uint64_t dropped_count () const
 
uint64_t failed_export_count () const
 
uint64_t add_log_callback (Callback callback) override
 Registers a callback to be invoked after each successfully written record.
 
bool remove_log_callback (uint64_t callback_id) override
 Unregisters a previously added callback.
 
- Public Member Functions inherited from logit::ILogger
virtual ~ILogger ()=default
 
virtual std::vector< std::string > get_buffered_strings () const
 Returns buffered formatted messages in chronological order.
 
virtual std::vector< BufferedLogEntry > get_buffered_entries () const
 Returns buffered structured entries in chronological order.
 
virtual std::vector< LogFileInfo > list_log_files () const
 Lists persisted log files owned by this backend.
 
virtual LogFileReadResult read_log_file (const std::string &path) const
 Reads one persisted log file owned by this backend.
 
virtual std::vector< LogFileReadResult > read_log_files (const std::vector< std::string > &paths) const
 Reads several persisted log files owned by this backend.
 
- Public Member Functions inherited from logit::ILogReader
virtual ~ILogReader ()=default
 
- Public Member Functions inherited from logit::ILogSubscriber
virtual ~ILogSubscriber ()=default
 

Private Types

typedef mdbxc::KeyValueTable< uint64_t, Session > SessionTable
 
typedef mdbxc::KeyValueTable< std::string, Record > RecordTable
 
typedef mdbxc::KeyValueTable< uint64_t, Payload > PayloadTable
 

Private Member Functions

void notify_callbacks (const std::vector< LogRecordSnapshot > &snapshots) const
 
void normalize_config ()
 
void validate_compression_config () const
 
void open_storage ()
 
void ensure_storage_parent (const mdbxc::Config &db_config) const
 
void report_init_error (const std::string &message) const noexcept
 
uint64_t open_session ()
 
bool find_session_locked (uint64_t session_id, Session &out, MDBX_txn *txn) const
 
void update_session_end ()
 
void worker_loop ()
 
void write_batch (const std::vector< MdbxLogItem > &batch)
 
Record write_item_locked (const MdbxLogItem &item, mdbxc::Transaction &txn)
 
bool should_spill_payload (const std::string &message) const
 
std::string make_payload_preview (const std::string &message) const
 
void fill_payload (const std::string &message, Payload &payload)
 
uint64_t allocate_payload_id_locked (mdbxc::Transaction &txn)
 
std::string next_record_key_locked (int64_t timestamp_ms, uint32_t &sequence, mdbxc::Transaction &txn)
 
void advance_sequence_after_collision (int64_t timestamp_ms, uint32_t sequence)
 
void mark_last_log (int64_t timestamp_ms)
 
int64_t get_last_log_ts () const
 
int64_t get_time_since_last_log () const
 

Static Private Member Functions

template<typename T >
static LogReadResult< T > make_not_found_result (const std::string &message)
 
static LogRecordSnapshot to_log_record_snapshot (const Record &r)
 
static SessionView to_view (const Session &s)
 
static PayloadView to_view (const Payload &p)
 
static std::vector< uint8_t > serialize_session (const Session &s)
 
static Session deserialize_session (const void *data, size_t size)
 
static std::vector< uint8_t > serialize_record (const Record &r)
 
static Record deserialize_record (const void *data, size_t size)
 
static std::vector< uint8_t > serialize_payload (const Payload &p)
 
static Payload deserialize_payload (const void *data, size_t size)
 
static uint64_t make_unique_id ()
 
static int64_t counter_to_int64 (uint64_t value)
 

Private Attributes

Config m_config
 
std::shared_ptr< mdbxc::Connection > m_connection
 
std::unique_ptr< SessionTable > m_sessions
 
std::unique_ptr< RecordTable > m_records
 
std::unique_ptr< PayloadTable > m_payloads
 
std::mutex m_db_mutex
 
std::mutex m_mutex
 
std::condition_variable m_cv
 
std::condition_variable m_space_cv
 
std::deque< MdbxLogItem > m_queue
 
bool m_stopping = false
 
bool m_idle = true
 
std::thread m_worker
 
uint64_t m_session_id = 0
 
std::unordered_map< int64_t, uint32_t > m_next_sequence_by_timestamp
 
std::atomic< int > m_log_level = ATOMIC_VAR_INIT(static_cast<int>(LogLevel::LOG_LVL_TRACE))
 
std::atomic< int64_t > m_last_log_ts = ATOMIC_VAR_INIT(0)
 
std::atomic< int64_t > m_last_log_mono_ts = ATOMIC_VAR_INIT(0)
 
std::atomic< uint64_t > m_dropped = ATOMIC_VAR_INIT(0)
 
std::atomic< uint64_t > m_failed_writes = ATOMIC_VAR_INIT(0)
 
std::atomic< bool > m_shutdown = ATOMIC_VAR_INIT(false)
 
std::mutex m_callbacks_mutex
 
std::map< uint64_t, Callback > m_callbacks
 
std::atomic< uint64_t > m_next_callback_id {1}
 

Additional Inherited Members

- Public Types inherited from logit::ILogSubscriber
using Callback = std::function<void(const LogRecordSnapshot&)>
 

Detailed Description

Stores formatted logs in MDBX tables with optional async batching.

Definition at line 46 of file MdbxLogger.hpp.

Member Typedef Documentation

◆ PayloadTable

mdbxc::KeyValueTable<uint64_t, Payload> logit::MdbxLogger::PayloadTable
private

Definition at line 582 of file MdbxLogger.hpp.

◆ RecordTable

mdbxc::KeyValueTable<std::string, Record> logit::MdbxLogger::RecordTable
private

Definition at line 581 of file MdbxLogger.hpp.

◆ SessionTable

mdbxc::KeyValueTable<uint64_t, Session> logit::MdbxLogger::SessionTable
private

Definition at line 580 of file MdbxLogger.hpp.

Constructor & Destructor Documentation

◆ MdbxLogger() [1/3]

logit::MdbxLogger::MdbxLogger ( )
inline

Definition at line 85 of file MdbxLogger.hpp.

◆ MdbxLogger() [2/3]

logit::MdbxLogger::MdbxLogger ( const Config & config)
inlineexplicit

Definition at line 87 of file MdbxLogger.hpp.

◆ ~MdbxLogger()

logit::MdbxLogger::~MdbxLogger ( )
inlineoverride

Definition at line 106 of file MdbxLogger.hpp.

◆ MdbxLogger() [3/3]

logit::MdbxLogger::MdbxLogger ( const MdbxLogger & )
delete

Member Function Documentation

◆ add_log_callback()

uint64_t logit::MdbxLogger::add_log_callback ( Callback callback)
inlineoverridevirtual

Registers a callback to be invoked after each successfully written record.

Parameters
callbackFunction called with the written LogRecordSnapshot.
Returns
Stable callback id that can be passed to remove_log_callback.

Implements logit::ILogSubscriber.

Definition at line 523 of file MdbxLogger.hpp.

◆ advance_sequence_after_collision()

void logit::MdbxLogger::advance_sequence_after_collision ( int64_t timestamp_ms,
uint32_t sequence )
inlineprivate

Definition at line 1074 of file MdbxLogger.hpp.

◆ allocate_payload_id_locked()

uint64_t logit::MdbxLogger::allocate_payload_id_locked ( mdbxc::Transaction & txn)
inlineprivate

Definition at line 1038 of file MdbxLogger.hpp.

◆ clear_logs()

LogClearResult logit::MdbxLogger::clear_logs ( const LogClearOptions & options = LogClearOptions())
inlineoverridevirtual

Clears logger-owned buffered or persisted records when supported.

Parameters
optionsData categories to clear.
Returns
Cleanup result. Default reports unsupported.

Implements logit::ILogger.

Definition at line 464 of file MdbxLogger.hpp.

◆ counter_to_int64()

static int64_t logit::MdbxLogger::counter_to_int64 ( uint64_t value)
inlinestaticprivate

Definition at line 1107 of file MdbxLogger.hpp.

◆ deserialize_payload()

static Payload logit::MdbxLogger::deserialize_payload ( const void * data,
size_t size )
inlinestaticprivate

Definition at line 755 of file MdbxLogger.hpp.

◆ deserialize_record()

static Record logit::MdbxLogger::deserialize_record ( const void * data,
size_t size )
inlinestaticprivate

Definition at line 724 of file MdbxLogger.hpp.

◆ deserialize_session()

static Session logit::MdbxLogger::deserialize_session ( const void * data,
size_t size )
inlinestaticprivate

Definition at line 691 of file MdbxLogger.hpp.

◆ dropped_count()

uint64_t logit::MdbxLogger::dropped_count ( ) const
inline

Definition at line 515 of file MdbxLogger.hpp.

◆ ensure_storage_parent()

void logit::MdbxLogger::ensure_storage_parent ( const mdbxc::Config & db_config) const
inlineprivate

Definition at line 813 of file MdbxLogger.hpp.

◆ failed_export_count()

uint64_t logit::MdbxLogger::failed_export_count ( ) const
inline

Definition at line 519 of file MdbxLogger.hpp.

◆ fill_payload()

void logit::MdbxLogger::fill_payload ( const std::string & message,
Payload & payload )
inlineprivate

Definition at line 1014 of file MdbxLogger.hpp.

◆ find_session_locked()

bool logit::MdbxLogger::find_session_locked ( uint64_t session_id,
Session & out,
MDBX_txn * txn ) const
inlineprivate

Definition at line 875 of file MdbxLogger.hpp.

◆ get_float_param()

double logit::MdbxLogger::get_float_param ( const LoggerParam & param) const
inlineoverridevirtual

Retrieves a floating-point parameter from the logger.

Derived classes should implement this to return specific floating-point-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
A double representing the requested parameter.

Implements logit::ILogger.

Definition at line 440 of file MdbxLogger.hpp.

◆ get_int_param()

int64_t logit::MdbxLogger::get_int_param ( const LoggerParam & param) const
inlineoverridevirtual

Retrieves an integer parameter from the logger.

Derived classes should implement this to return specific integer-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
An integer representing the requested parameter.

Implements logit::ILogger.

Definition at line 428 of file MdbxLogger.hpp.

◆ get_last_log_ts()

int64_t logit::MdbxLogger::get_last_log_ts ( ) const
inlineprivate

Definition at line 1094 of file MdbxLogger.hpp.

◆ get_log_level()

LogLevel logit::MdbxLogger::get_log_level ( ) const
inlineoverridevirtual

Gets the minimal log level for this logger.

Returns
Current minimal log level.

Implements logit::ILogger.

Definition at line 460 of file MdbxLogger.hpp.

◆ get_string_param()

std::string logit::MdbxLogger::get_string_param ( const LoggerParam & param) const
inlineoverridevirtual

Retrieves a string parameter from the logger.

Derived classes should implement this to return specific string-based parameters.

Parameters
paramThe parameter type to retrieve.
Returns
A string representing the requested parameter.

Implements logit::ILogger.

Definition at line 416 of file MdbxLogger.hpp.

◆ get_time_since_last_log()

int64_t logit::MdbxLogger::get_time_since_last_log ( ) const
inlineprivate

Definition at line 1098 of file MdbxLogger.hpp.

◆ log()

void logit::MdbxLogger::log ( const LogRecord & record,
const std::string & message )
inlineoverridevirtual

Queues or writes a formatted log record.

Implements logit::ILogger.

Definition at line 114 of file MdbxLogger.hpp.

◆ make_not_found_result()

template<typename T >
static LogReadResult< T > logit::MdbxLogger::make_not_found_result ( const std::string & message)
inlinestaticprivate

Definition at line 615 of file MdbxLogger.hpp.

◆ make_payload_preview()

std::string logit::MdbxLogger::make_payload_preview ( const std::string & message) const
inlineprivate

Definition at line 1009 of file MdbxLogger.hpp.

◆ make_unique_id()

static uint64_t logit::MdbxLogger::make_unique_id ( )
inlinestaticprivate

Definition at line 1081 of file MdbxLogger.hpp.

◆ mark_last_log()

void logit::MdbxLogger::mark_last_log ( int64_t timestamp_ms)
inlineprivate

Definition at line 1089 of file MdbxLogger.hpp.

◆ next_record_key_locked()

std::string logit::MdbxLogger::next_record_key_locked ( int64_t timestamp_ms,
uint32_t & sequence,
mdbxc::Transaction & txn )
inlineprivate

Definition at line 1048 of file MdbxLogger.hpp.

◆ normalize_config()

void logit::MdbxLogger::normalize_config ( )
inlineprivate

Definition at line 777 of file MdbxLogger.hpp.

◆ notify_callbacks()

void logit::MdbxLogger::notify_callbacks ( const std::vector< LogRecordSnapshot > & snapshots) const
inlineprivate

Definition at line 622 of file MdbxLogger.hpp.

◆ open_session()

uint64_t logit::MdbxLogger::open_session ( )
inlineprivate

Definition at line 828 of file MdbxLogger.hpp.

◆ open_storage()

void logit::MdbxLogger::open_storage ( )
inlineprivate

Definition at line 799 of file MdbxLogger.hpp.

◆ operator=()

MdbxLogger & logit::MdbxLogger::operator= ( const MdbxLogger & )
delete

◆ read_payload()

std::optional< PayloadView > logit::MdbxLogger::read_payload ( uint64_t payload_id) const
inline

Reads a payload by id.

Definition at line 300 of file MdbxLogger.hpp.

◆ read_payload_data()

std::optional< std::string > logit::MdbxLogger::read_payload_data ( uint64_t payload_id) const
inline

Reads and decompresses payload data by id.

Returns
Original (decompressed) payload string, or std::nullopt if not found or decompression fails.

Definition at line 342 of file MdbxLogger.hpp.

◆ read_payload_data_result()

LogReadResult< std::string > logit::MdbxLogger::read_payload_data_result ( uint64_t payload_id) const
inline

Reads and decompresses payload data while preserving failure details.

Definition at line 347 of file MdbxLogger.hpp.

◆ read_payload_result()

LogReadResult< PayloadView > logit::MdbxLogger::read_payload_result ( uint64_t payload_id) const
inline

Reads a payload by id and preserves storage/decode errors.

Definition at line 305 of file MdbxLogger.hpp.

◆ read_range()

std::vector< LogRecordSnapshot > logit::MdbxLogger::read_range ( int64_t from_ms,
int64_t to_ms,
std::size_t limit = 0 ) const
inlineoverridevirtual

Reads records in [from_ms, to_ms) ordered by timestamp and sequence.

Implements logit::ILogReader.

Definition at line 212 of file MdbxLogger.hpp.

◆ read_range_result()

LogReadResult< std::vector< LogRecordSnapshot > > logit::MdbxLogger::read_range_result ( int64_t from_ms,
int64_t to_ms,
std::size_t limit = 0 ) const
inlineoverride

Reads records and preserves storage/decode errors.

Definition at line 221 of file MdbxLogger.hpp.

◆ read_recent()

std::vector< LogRecordSnapshot > logit::MdbxLogger::read_recent ( std::size_t limit,
int64_t period_ms = 0,
LogReadOrder order = LogReadOrder::Ascending ) const
inlineoverridevirtual

Reads the most recent records.

Parameters
limitMaximum number of records (0 = unlimited).
period_msTime window in milliseconds from now backward (0 = unlimited).
orderAscending or descending result order.
Returns
Matching records in the requested order.

Implements logit::ILogReader.

Definition at line 269 of file MdbxLogger.hpp.

◆ read_recent_result()

LogReadResult< std::vector< LogRecordSnapshot > > logit::MdbxLogger::read_recent_result ( std::size_t limit,
int64_t period_ms = 0,
LogReadOrder order = LogReadOrder::Ascending ) const
inlineoverride

Reads the most recent records and preserves storage/decode errors.

Definition at line 278 of file MdbxLogger.hpp.

◆ read_session()

std::optional< SessionView > logit::MdbxLogger::read_session ( uint64_t session_id) const
inline

Reads session metadata by id.

Definition at line 376 of file MdbxLogger.hpp.

◆ read_session_result()

LogReadResult< SessionView > logit::MdbxLogger::read_session_result ( uint64_t session_id) const
inline

Reads session metadata by id and preserves storage/decode errors.

Definition at line 381 of file MdbxLogger.hpp.

◆ remove_log_callback()

bool logit::MdbxLogger::remove_log_callback ( uint64_t callback_id)
inlineoverridevirtual

Unregisters a previously added callback.

Removal prevents future dispatch snapshots from including the callback, but cannot cancel an invocation that has already been copied for dispatch.

Parameters
callback_idId returned by add_log_callback.
Returns
True if the callback existed and was removed.

Implements logit::ILogSubscriber.

Definition at line 530 of file MdbxLogger.hpp.

◆ report_init_error()

void logit::MdbxLogger::report_init_error ( const std::string & message) const
inlineprivatenoexcept

Definition at line 819 of file MdbxLogger.hpp.

◆ serialize_payload()

static std::vector< uint8_t > logit::MdbxLogger::serialize_payload ( const Payload & p)
inlinestaticprivate

Definition at line 746 of file MdbxLogger.hpp.

◆ serialize_record()

static std::vector< uint8_t > logit::MdbxLogger::serialize_record ( const Record & r)
inlinestaticprivate

Definition at line 709 of file MdbxLogger.hpp.

◆ serialize_session()

static std::vector< uint8_t > logit::MdbxLogger::serialize_session ( const Session & s)
inlinestaticprivate

Definition at line 680 of file MdbxLogger.hpp.

◆ session_id()

uint64_t logit::MdbxLogger::session_id ( ) const
inline

Returns this logger session id.

Definition at line 207 of file MdbxLogger.hpp.

◆ set_log_level()

void logit::MdbxLogger::set_log_level ( LogLevel level)
inlineoverridevirtual

Sets the minimal log level for this logger.

Parameters
levelMinimum log level.

Implements logit::ILogger.

Definition at line 456 of file MdbxLogger.hpp.

◆ should_spill_payload()

bool logit::MdbxLogger::should_spill_payload ( const std::string & message) const
inlineprivate

Definition at line 1004 of file MdbxLogger.hpp.

◆ shutdown()

void logit::MdbxLogger::shutdown ( )
inlineoverridevirtual

Stops the worker after draining accepted records.

Implements logit::ILogger.

Definition at line 182 of file MdbxLogger.hpp.

◆ to_log_record_snapshot()

static LogRecordSnapshot logit::MdbxLogger::to_log_record_snapshot ( const Record & r)
inlinestaticprivate

Definition at line 648 of file MdbxLogger.hpp.

◆ to_view() [1/2]

static PayloadView logit::MdbxLogger::to_view ( const Payload & p)
inlinestaticprivate

Definition at line 672 of file MdbxLogger.hpp.

◆ to_view() [2/2]

static SessionView logit::MdbxLogger::to_view ( const Session & s)
inlinestaticprivate

Definition at line 662 of file MdbxLogger.hpp.

◆ update_session_end()

void logit::MdbxLogger::update_session_end ( )
inlineprivate

Definition at line 889 of file MdbxLogger.hpp.

◆ validate_compression_config()

void logit::MdbxLogger::validate_compression_config ( ) const
inlineprivate

Definition at line 786 of file MdbxLogger.hpp.

◆ wait()

void logit::MdbxLogger::wait ( )
inlineoverridevirtual

Waits until accepted async records are written.

Implements logit::ILogger.

Definition at line 170 of file MdbxLogger.hpp.

◆ worker_loop()

void logit::MdbxLogger::worker_loop ( )
inlineprivate

Definition at line 904 of file MdbxLogger.hpp.

◆ write_batch()

void logit::MdbxLogger::write_batch ( const std::vector< MdbxLogItem > & batch)
inlineprivate

Definition at line 944 of file MdbxLogger.hpp.

◆ write_item_locked()

Record logit::MdbxLogger::write_item_locked ( const MdbxLogItem & item,
mdbxc::Transaction & txn )
inlineprivate

Definition at line 975 of file MdbxLogger.hpp.

Member Data Documentation

◆ m_callbacks

std::map<uint64_t, Callback> logit::MdbxLogger::m_callbacks
private

Definition at line 611 of file MdbxLogger.hpp.

◆ m_callbacks_mutex

std::mutex logit::MdbxLogger::m_callbacks_mutex
mutableprivate

Definition at line 610 of file MdbxLogger.hpp.

◆ m_config

Config logit::MdbxLogger::m_config
private

Definition at line 584 of file MdbxLogger.hpp.

◆ m_connection

std::shared_ptr<mdbxc::Connection> logit::MdbxLogger::m_connection
private

Definition at line 585 of file MdbxLogger.hpp.

◆ m_cv

std::condition_variable logit::MdbxLogger::m_cv
private

Definition at line 593 of file MdbxLogger.hpp.

◆ m_db_mutex

std::mutex logit::MdbxLogger::m_db_mutex
mutableprivate

Definition at line 590 of file MdbxLogger.hpp.

◆ m_dropped

std::atomic<uint64_t> logit::MdbxLogger::m_dropped = ATOMIC_VAR_INIT(0)
private

Definition at line 606 of file MdbxLogger.hpp.

◆ m_failed_writes

std::atomic<uint64_t> logit::MdbxLogger::m_failed_writes = ATOMIC_VAR_INIT(0)
private

Definition at line 607 of file MdbxLogger.hpp.

◆ m_idle

bool logit::MdbxLogger::m_idle = true
private

Definition at line 597 of file MdbxLogger.hpp.

◆ m_last_log_mono_ts

std::atomic<int64_t> logit::MdbxLogger::m_last_log_mono_ts = ATOMIC_VAR_INIT(0)
private

Definition at line 605 of file MdbxLogger.hpp.

◆ m_last_log_ts

std::atomic<int64_t> logit::MdbxLogger::m_last_log_ts = ATOMIC_VAR_INIT(0)
private

Definition at line 604 of file MdbxLogger.hpp.

◆ m_log_level

std::atomic<int> logit::MdbxLogger::m_log_level = ATOMIC_VAR_INIT(static_cast<int>(LogLevel::LOG_LVL_TRACE))
private

Definition at line 603 of file MdbxLogger.hpp.

◆ m_mutex

std::mutex logit::MdbxLogger::m_mutex
private

Definition at line 592 of file MdbxLogger.hpp.

◆ m_next_callback_id

std::atomic<uint64_t> logit::MdbxLogger::m_next_callback_id {1}
private

Definition at line 612 of file MdbxLogger.hpp.

◆ m_next_sequence_by_timestamp

std::unordered_map<int64_t, uint32_t> logit::MdbxLogger::m_next_sequence_by_timestamp
private

Definition at line 601 of file MdbxLogger.hpp.

◆ m_payloads

std::unique_ptr<PayloadTable> logit::MdbxLogger::m_payloads
private

Definition at line 588 of file MdbxLogger.hpp.

◆ m_queue

std::deque<MdbxLogItem> logit::MdbxLogger::m_queue
private

Definition at line 595 of file MdbxLogger.hpp.

◆ m_records

std::unique_ptr<RecordTable> logit::MdbxLogger::m_records
private

Definition at line 587 of file MdbxLogger.hpp.

◆ m_session_id

uint64_t logit::MdbxLogger::m_session_id = 0
private

Definition at line 600 of file MdbxLogger.hpp.

◆ m_sessions

std::unique_ptr<SessionTable> logit::MdbxLogger::m_sessions
private

Definition at line 586 of file MdbxLogger.hpp.

◆ m_shutdown

std::atomic<bool> logit::MdbxLogger::m_shutdown = ATOMIC_VAR_INIT(false)
private

Definition at line 608 of file MdbxLogger.hpp.

◆ m_space_cv

std::condition_variable logit::MdbxLogger::m_space_cv
private

Definition at line 594 of file MdbxLogger.hpp.

◆ m_stopping

bool logit::MdbxLogger::m_stopping = false
private

Definition at line 596 of file MdbxLogger.hpp.

◆ m_worker

std::thread logit::MdbxLogger::m_worker
private

Definition at line 598 of file MdbxLogger.hpp.


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