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

Logs messages to files with date-based rotation and automatic deletion of old logs. More...

#include <FileLogger.hpp>

Inheritance diagram for logit::FileLogger:
logit::ILogger

Classes

struct  Config
 Configuration for the file logger. More...
 
struct  FileSortKey
 

Public Member Functions

 FileLogger ()
 Default constructor that uses default configuration.
 
 FileLogger (const Config &config)
 Constructor with custom configuration.
 
 FileLogger (const std::string &directory, const bool &async=true, const int &auto_delete_days=30)
 Constructor with directory and asynchronous flag.
 
 FileLogger (const std::string &directory, const bool &async, const int &auto_delete_days, bool use_dedicated_executor, std::size_t queue_capacity, QueuePolicy queue_policy)
 Constructor with directory, async flag, and dedicated executor options.
 
 FileLogger (const std::string &directory, const bool &async, const int &auto_delete_days, uint64_t max_file_size_bytes, uint32_t max_rotated_files)
 Constructor with directory, size-based rotation and additional options.
 
 FileLogger (const std::string &directory, const bool &async, const int &auto_delete_days, uint64_t max_file_size_bytes, uint32_t max_rotated_files, bool use_dedicated_executor, std::size_t queue_capacity, QueuePolicy queue_policy)
 Constructor with directory, rotation, and dedicated executor options.
 
virtual ~FileLogger ()
 Destructor to stop logging and close file.
 
void set_config (const Config &config)
 Updates executor-related configuration at runtime.
 
bool set_queue_config (std::size_t queue_capacity, QueuePolicy queue_policy)
 Updates queue_capacity and queue_policy at runtime without draining tasks.
 
void log (const LogRecord &record, const std::string &message) override
 Logs a message to a file with thread safety.
 
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.
 
std::vector< LogFileInfo > list_log_files () const override
 Lists persisted log files owned by this backend.
 
LogFileReadResult read_log_file (const std::string &path) const override
 Reads one persisted log file owned by this backend.
 
std::vector< LogFileReadResult > read_log_files (const std::vector< std::string > &paths) const override
 Reads several persisted log files owned by this backend.
 
LogClearResult clear_logs (const LogClearOptions &options=LogClearOptions()) override
 Clears managed log files and reopens the current log file.
 
void wait () override
 Waits for all asynchronous tasks to complete.
 
void shutdown () override
 Stops logger-owned asynchronous resources after draining pending writes.
 
- 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.
 

Private Member Functions

void start_logging ()
 Starts the logging process by initializing the file and directory.
 
void stop_logging ()
 Stops the logging process by closing the file and waiting for tasks.
 
void initialize_directory ()
 Initializes the logging directory.
 
std::string get_directory_path () const
 Gets the full path to the logging directory.
 
void open_log_file (const int64_t &date_ts)
 Opens a new log file based on the provided date timestamp.
 
std::string create_file_path (int64_t date_ts) const
 Creates a file path for the log file based on the date timestamp.
 
bool try_make_log_file_info (const std::string &file_path, const std::string &current_file_path, LogFileInfo &info) const
 
LogFileReadResult read_log_file_from_info (const LogFileInfo &info) const
 
bool read_plain_file (const std::string &file_path, std::string &out) const
 
bool remove_file_path (const std::string &file_path) const
 
void sort_log_files_newest_first (std::vector< LogFileInfo > &files) const
 
bool is_direct_child_path (const std::string &file_path, const std::string &directory_path) const
 
bool same_path (const std::string &lhs, const std::string &rhs) const
 
std::string normalize_path_separators (const std::string &path) const
 
bool is_compressed_log_filename (const std::string &filename) const
 
std::string strip_compression_suffix (const std::string &filename) const
 
bool ends_with (const std::string &value, const std::string &suffix) const
 
void write_log (const std::string &message, const int64_t &timestamp_ms)
 Writes a log message to the file.
 
void rotate_current_file ()
 
void enforce_rotation_retention (const std::string &base, uint32_t max_files, const std::string &dir)
 
std::string make_rotated_name (const std::string &base, const std::string &dir) const
 
std::string make_sequence_name (const std::string &base, const std::string &dir) const
 
std::string make_timestamp_name (const std::string &base, const std::string &dir) const
 
void remove_old_logs ()
 Removes old log files based on the auto-delete days configuration.
 
bool is_valid_log_filename (const std::string &filename) const
 Checks if the filename matches the log file naming pattern.
 
int64_t get_date_ts_from_filename (const std::string &filename) const
 Extracts the date timestamp from the log filename.
 
int64_t get_current_utc_date_ts () const
 Gets the current UTC date timestamp in seconds.
 
int64_t current_timestamp_ms () const
 Gets the current timestamp in milliseconds.
 
std::string get_last_log_file_path () const
 Retrieves the last log file path.
 
std::string get_last_log_file_name () const
 Retrieves the last log file name.
 
int64_t get_last_log_ts () const
 Retrieves the timestamp of the last log.
 
int64_t get_time_since_last_log () const
 Retrieves the time since the last log.
 

Static Private Member Functions

static Config make_config (const std::string &directory, bool async, int auto_delete_days, uint64_t max_file_size_bytes, uint32_t max_rotated_files, bool use_dedicated_executor, std::size_t queue_capacity, QueuePolicy queue_policy)
 
static FileSortKey make_file_sort_key (const LogFileInfo &info)
 
static std::string strip_compression_suffix_impl (const std::string &filename)
 
static bool ends_with_impl (const std::string &value, const std::string &suffix)
 

Private Attributes

std::mutex m_mutex
 Mutex to protect file operations.
 
std::mutex m_lifecycle_mutex
 Serializes direct log() calls with shutdown().
 
Config m_config
 Configuration for the file logger.
 
std::ofstream m_file
 Output file stream for logging.
 
std::mutex m_file_path_mutex
 Mutex to protect file path operations.
 
std::string m_file_path
 Path of the currently open log file.
 
std::string m_file_name
 Name of the currently open log file.
 
int64_t m_current_date_ts = 0
 Timestamp of the current log file's date.
 
uint64_t m_current_file_size = 0
 Current size of the log file.
 
std::unique_ptr< detail::CompressionWorker > m_compressor
 Background compressor.
 
std::unique_ptr< detail::SingleThreadExecutor > m_executor
 Dedicated executor (null = use global).
 
std::atomic< int64_t > m_last_log_ts = ATOMIC_VAR_INIT(0)
 Timestamp of the last log.
 
std::atomic< int64_t > m_last_log_mono_ts = ATOMIC_VAR_INIT(0)
 Timestamp of the last log.
 
std::atomic< int > m_log_level = ATOMIC_VAR_INIT(static_cast<int>(LogLevel::LOG_LVL_TRACE))
 
std::atomic< bool > m_shutdown = ATOMIC_VAR_INIT(false)
 

Detailed Description

Logs messages to files with date-based rotation and automatic deletion of old logs.

This logger writes logs to files organized by date. It supports asynchronous logging and manages old files based on a configurable retention period.

Key Features:

  • Date-based file rotation.
  • Automatic cleanup of old files.
  • Synchronous or asynchronous operation.

Definition at line 90 of file FileLogger.hpp.

Constructor & Destructor Documentation

◆ FileLogger() [1/6]

logit::FileLogger::FileLogger ( )
inline

Default constructor that uses default configuration.

Definition at line 113 of file FileLogger.hpp.

◆ FileLogger() [2/6]

logit::FileLogger::FileLogger ( const Config & config)
inline

Constructor with custom configuration.

Parameters
configThe configuration for the logger.

Definition at line 119 of file FileLogger.hpp.

◆ FileLogger() [3/6]

logit::FileLogger::FileLogger ( const std::string & directory,
const bool & async = true,
const int & auto_delete_days = 30 )
inline

Constructor with directory and asynchronous flag.

Parameters
directoryThe directory where log files will be stored.
asyncBoolean flag for asynchronous logging.
auto_delete_daysNumber of days after which old log files are deleted.

Definition at line 132 of file FileLogger.hpp.

◆ FileLogger() [4/6]

logit::FileLogger::FileLogger ( const std::string & directory,
const bool & async,
const int & auto_delete_days,
bool use_dedicated_executor,
std::size_t queue_capacity,
QueuePolicy queue_policy )
inline

Constructor with directory, async flag, and dedicated executor options.

Definition at line 143 of file FileLogger.hpp.

◆ FileLogger() [5/6]

logit::FileLogger::FileLogger ( const std::string & directory,
const bool & async,
const int & auto_delete_days,
uint64_t max_file_size_bytes,
uint32_t max_rotated_files )
inline

Constructor with directory, size-based rotation and additional options.

Definition at line 161 of file FileLogger.hpp.

◆ FileLogger() [6/6]

logit::FileLogger::FileLogger ( const std::string & directory,
const bool & async,
const int & auto_delete_days,
uint64_t max_file_size_bytes,
uint32_t max_rotated_files,
bool use_dedicated_executor,
std::size_t queue_capacity,
QueuePolicy queue_policy )
inline

Constructor with directory, rotation, and dedicated executor options.

Definition at line 176 of file FileLogger.hpp.

◆ ~FileLogger()

virtual logit::FileLogger::~FileLogger ( )
inlinevirtual

Destructor to stop logging and close file.

Definition at line 196 of file FileLogger.hpp.

Member Function Documentation

◆ clear_logs()

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

Clears managed log files and reopens the current log file.

Implements logit::ILogger.

Definition at line 469 of file FileLogger.hpp.

◆ create_file_path()

std::string logit::FileLogger::create_file_path ( int64_t date_ts) const
inlineprivate

Creates a file path for the log file based on the date timestamp.

Parameters
date_tsThe timestamp representing the date for the log file.
Returns
The path to the log file.

Definition at line 645 of file FileLogger.hpp.

◆ current_timestamp_ms()

int64_t logit::FileLogger::current_timestamp_ms ( ) const
inlineprivate

Gets the current timestamp in milliseconds.

Returns
The current timestamp in milliseconds.

Definition at line 1166 of file FileLogger.hpp.

◆ ends_with()

bool logit::FileLogger::ends_with ( const std::string & value,
const std::string & suffix ) const
inlineprivate

Definition at line 835 of file FileLogger.hpp.

◆ ends_with_impl()

static bool logit::FileLogger::ends_with_impl ( const std::string & value,
const std::string & suffix )
inlinestaticprivate

Definition at line 839 of file FileLogger.hpp.

◆ enforce_rotation_retention()

void logit::FileLogger::enforce_rotation_retention ( const std::string & base,
uint32_t max_files,
const std::string & dir )
inlineprivate

Definition at line 925 of file FileLogger.hpp.

◆ get_current_utc_date_ts()

int64_t logit::FileLogger::get_current_utc_date_ts ( ) const
inlineprivate

Gets the current UTC date timestamp in seconds.

Returns
The current UTC date timestamp in seconds.

Definition at line 1160 of file FileLogger.hpp.

◆ get_date_ts_from_filename()

int64_t logit::FileLogger::get_date_ts_from_filename ( const std::string & filename) const
inlineprivate

Extracts the date timestamp from the log filename.

Parameters
filenameThe filename to extract the date from.
Returns
The date timestamp.

Definition at line 1154 of file FileLogger.hpp.

◆ get_directory_path()

std::string logit::FileLogger::get_directory_path ( ) const
inlineprivate

Gets the full path to the logging directory.

Returns
The path to the logging directory.

Definition at line 611 of file FileLogger.hpp.

◆ get_float_param()

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

Retrieves a floating-point parameter from the logger.

Parameters
paramThe parameter type to retrieve.
Returns
A double representing the requested parameter, or 0.0 if the parameter is unsupported.

Implements logit::ILogger.

Definition at line 353 of file FileLogger.hpp.

◆ get_int_param()

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

Retrieves an integer parameter from the logger.

Parameters
paramThe parameter type to retrieve.
Returns
An integer representing the requested parameter, or 0 if the parameter is unsupported.

Implements logit::ILogger.

Definition at line 340 of file FileLogger.hpp.

◆ get_last_log_file_name()

std::string logit::FileLogger::get_last_log_file_name ( ) const
inlineprivate

Retrieves the last log file name.

Returns
The last log file name.

Definition at line 1179 of file FileLogger.hpp.

◆ get_last_log_file_path()

std::string logit::FileLogger::get_last_log_file_path ( ) const
inlineprivate

Retrieves the last log file path.

Returns
The last log file path.

Definition at line 1172 of file FileLogger.hpp.

◆ get_last_log_ts()

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

Retrieves the timestamp of the last log.

Returns
The last log timestamp.

Definition at line 1186 of file FileLogger.hpp.

◆ get_log_level()

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

Gets the minimal log level for this logger.

Implements logit::ILogger.

Definition at line 371 of file FileLogger.hpp.

◆ get_string_param()

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

Retrieves a string parameter from the logger.

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

Implements logit::ILogger.

Definition at line 325 of file FileLogger.hpp.

◆ get_time_since_last_log()

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

Retrieves the time since the last log.

Returns
The time in milliseconds since the last log.

Definition at line 1192 of file FileLogger.hpp.

◆ initialize_directory()

void logit::FileLogger::initialize_directory ( )
inlineprivate

Initializes the logging directory.

Definition at line 605 of file FileLogger.hpp.

◆ is_compressed_log_filename()

bool logit::FileLogger::is_compressed_log_filename ( const std::string & filename) const
inlineprivate

Definition at line 817 of file FileLogger.hpp.

◆ is_direct_child_path()

bool logit::FileLogger::is_direct_child_path ( const std::string & file_path,
const std::string & directory_path ) const
inlineprivate

Definition at line 780 of file FileLogger.hpp.

◆ is_valid_log_filename()

bool logit::FileLogger::is_valid_log_filename ( const std::string & filename) const
inlineprivate

Checks if the filename matches the log file naming pattern.

Parameters
filenameThe filename to check.
Returns
True if the filename matches the pattern, false otherwise.

Definition at line 1141 of file FileLogger.hpp.

◆ list_log_files()

std::vector< LogFileInfo > logit::FileLogger::list_log_files ( ) const
inlineoverridevirtual

Lists persisted log files owned by this backend.

Returns
Persisted log files sorted newest-first.

Implements logit::ILogger.

Definition at line 377 of file FileLogger.hpp.

◆ log()

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

Logs a message to a file with thread safety.

If asynchronous logging is enabled, the message is added to the task queue; otherwise, it is logged directly.

Parameters
recordThe log record containing log information.
messageThe formatted log message.

Implements logit::ILogger.

Definition at line 286 of file FileLogger.hpp.

◆ make_config()

static Config logit::FileLogger::make_config ( const std::string & directory,
bool async,
int auto_delete_days,
uint64_t max_file_size_bytes,
uint32_t max_rotated_files,
bool use_dedicated_executor,
std::size_t queue_capacity,
QueuePolicy queue_policy )
inlinestaticprivate

Definition at line 558 of file FileLogger.hpp.

◆ make_file_sort_key()

static FileSortKey logit::FileLogger::make_file_sort_key ( const LogFileInfo & info)
inlinestaticprivate

Definition at line 753 of file FileLogger.hpp.

◆ make_rotated_name()

std::string logit::FileLogger::make_rotated_name ( const std::string & base,
const std::string & dir ) const
inlineprivate

Definition at line 1007 of file FileLogger.hpp.

◆ make_sequence_name()

std::string logit::FileLogger::make_sequence_name ( const std::string & base,
const std::string & dir ) const
inlineprivate

Definition at line 1018 of file FileLogger.hpp.

◆ make_timestamp_name()

std::string logit::FileLogger::make_timestamp_name ( const std::string & base,
const std::string & dir ) const
inlineprivate

Definition at line 1049 of file FileLogger.hpp.

◆ normalize_path_separators()

std::string logit::FileLogger::normalize_path_separators ( const std::string & path) const
inlineprivate

Definition at line 809 of file FileLogger.hpp.

◆ open_log_file()

void logit::FileLogger::open_log_file ( const int64_t & date_ts)
inlineprivate

Opens a new log file based on the provided date timestamp.

Parameters
date_tsThe timestamp representing the date for the log file.

Definition at line 621 of file FileLogger.hpp.

◆ read_log_file()

LogFileReadResult logit::FileLogger::read_log_file ( const std::string & path) const
inlineoverridevirtual

Reads one persisted log file owned by this backend.

This API reads only the already persisted file contents and does not wait for pending async writes.

Parameters
pathFull path returned by list_log_files().
Returns
Read result. Compressed files are listed but unreadable in v1.

Implements logit::ILogger.

Definition at line 423 of file FileLogger.hpp.

◆ read_log_file_from_info()

LogFileReadResult logit::FileLogger::read_log_file_from_info ( const LogFileInfo & info) const
inlineprivate

Definition at line 671 of file FileLogger.hpp.

◆ read_log_files()

std::vector< LogFileReadResult > logit::FileLogger::read_log_files ( const std::vector< std::string > & paths) const
inlineoverridevirtual

Reads several persisted log files owned by this backend.

Parameters
pathsFull paths returned by list_log_files().
Returns
Per-file results in the same order as the request.

Implements logit::ILogger.

Definition at line 441 of file FileLogger.hpp.

◆ read_plain_file()

bool logit::FileLogger::read_plain_file ( const std::string & file_path,
std::string & out ) const
inlineprivate

Definition at line 691 of file FileLogger.hpp.

◆ remove_file_path()

bool logit::FileLogger::remove_file_path ( const std::string & file_path) const
inlineprivate

Definition at line 708 of file FileLogger.hpp.

◆ remove_old_logs()

void logit::FileLogger::remove_old_logs ( )
inlineprivate

Removes old log files based on the auto-delete days configuration.

Definition at line 1095 of file FileLogger.hpp.

◆ rotate_current_file()

void logit::FileLogger::rotate_current_file ( )
inlineprivate

Definition at line 865 of file FileLogger.hpp.

◆ same_path()

bool logit::FileLogger::same_path ( const std::string & lhs,
const std::string & rhs ) const
inlineprivate

Definition at line 797 of file FileLogger.hpp.

◆ set_config()

void logit::FileLogger::set_config ( const Config & config)
inline

Updates executor-related configuration at runtime.

This call is blocking. If asynchronous logging is currently enabled, it waits until already accepted tasks are drained before changing async mode or executor ownership. Only async, use_dedicated_executor, queue_capacity, and queue_policy are applied. File/rotation/compression fields are ignored. For hot queue tuning without switching executor mode, use set_queue_config().

Definition at line 208 of file FileLogger.hpp.

◆ set_log_level()

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

Sets the minimal log level for this logger.

Implements logit::ILogger.

Definition at line 366 of file FileLogger.hpp.

◆ set_queue_config()

bool logit::FileLogger::set_queue_config ( std::size_t queue_capacity,
QueuePolicy queue_policy )
inline

Updates queue_capacity and queue_policy at runtime without draining tasks.

Parameters
queue_capacityNew maximum queue size (0 = unlimited).
queue_policyOverflow policy for the executor queue.
Returns
true if a dedicated executor was present and updated; false if the logger is shut down or uses the global executor.

Unlike set_config(), this method never blocks on task drain and never changes async mode or executor ownership. If no dedicated executor exists, only the stored config fields are updated for future reference.

Definition at line 257 of file FileLogger.hpp.

◆ shutdown()

void logit::FileLogger::shutdown ( )
inlineoverridevirtual

Stops logger-owned asynchronous resources after draining pending writes.

Implements logit::ILogger.

Definition at line 527 of file FileLogger.hpp.

◆ sort_log_files_newest_first()

void logit::FileLogger::sort_log_files_newest_first ( std::vector< LogFileInfo > & files) const
inlineprivate

Definition at line 716 of file FileLogger.hpp.

◆ start_logging()

void logit::FileLogger::start_logging ( )
inlineprivate

Starts the logging process by initializing the file and directory.

Definition at line 580 of file FileLogger.hpp.

◆ stop_logging()

void logit::FileLogger::stop_logging ( )
inlineprivate

Stops the logging process by closing the file and waiting for tasks.

Definition at line 596 of file FileLogger.hpp.

◆ strip_compression_suffix()

std::string logit::FileLogger::strip_compression_suffix ( const std::string & filename) const
inlineprivate

Definition at line 821 of file FileLogger.hpp.

◆ strip_compression_suffix_impl()

static std::string logit::FileLogger::strip_compression_suffix_impl ( const std::string & filename)
inlinestaticprivate

Definition at line 825 of file FileLogger.hpp.

◆ try_make_log_file_info()

bool logit::FileLogger::try_make_log_file_info ( const std::string & file_path,
const std::string & current_file_path,
LogFileInfo & info ) const
inlineprivate

Definition at line 650 of file FileLogger.hpp.

◆ wait()

void logit::FileLogger::wait ( )
inlineoverridevirtual

Waits for all asynchronous tasks to complete.

Implements logit::ILogger.

Definition at line 514 of file FileLogger.hpp.

◆ write_log()

void logit::FileLogger::write_log ( const std::string & message,
const int64_t & timestamp_ms )
inlineprivate

Writes a log message to the file.

Parameters
messageThe log message to write.
timestamp_msThe timestamp of the log message in milliseconds.

Definition at line 847 of file FileLogger.hpp.

Member Data Documentation

◆ m_compressor

std::unique_ptr<detail::CompressionWorker> logit::FileLogger::m_compressor
private

Background compressor.

Definition at line 551 of file FileLogger.hpp.

◆ m_config

Config logit::FileLogger::m_config
private

Configuration for the file logger.

Definition at line 544 of file FileLogger.hpp.

◆ m_current_date_ts

int64_t logit::FileLogger::m_current_date_ts = 0
private

Timestamp of the current log file's date.

Definition at line 549 of file FileLogger.hpp.

◆ m_current_file_size

uint64_t logit::FileLogger::m_current_file_size = 0
private

Current size of the log file.

Definition at line 550 of file FileLogger.hpp.

◆ m_executor

std::unique_ptr<detail::SingleThreadExecutor> logit::FileLogger::m_executor
private

Dedicated executor (null = use global).

Definition at line 552 of file FileLogger.hpp.

◆ m_file

std::ofstream logit::FileLogger::m_file
mutableprivate

Output file stream for logging.

Definition at line 545 of file FileLogger.hpp.

◆ m_file_name

std::string logit::FileLogger::m_file_name
private

Name of the currently open log file.

Definition at line 548 of file FileLogger.hpp.

◆ m_file_path

std::string logit::FileLogger::m_file_path
private

Path of the currently open log file.

Definition at line 547 of file FileLogger.hpp.

◆ m_file_path_mutex

std::mutex logit::FileLogger::m_file_path_mutex
mutableprivate

Mutex to protect file path operations.

Definition at line 546 of file FileLogger.hpp.

◆ m_last_log_mono_ts

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

Timestamp of the last log.

Definition at line 554 of file FileLogger.hpp.

◆ m_last_log_ts

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

Timestamp of the last log.

Definition at line 553 of file FileLogger.hpp.

◆ m_lifecycle_mutex

std::mutex logit::FileLogger::m_lifecycle_mutex
private

Serializes direct log() calls with shutdown().

Definition at line 543 of file FileLogger.hpp.

◆ m_log_level

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

Definition at line 555 of file FileLogger.hpp.

◆ m_mutex

std::mutex logit::FileLogger::m_mutex
mutableprivate

Mutex to protect file operations.

Definition at line 542 of file FileLogger.hpp.

◆ m_shutdown

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

Definition at line 556 of file FileLogger.hpp.


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