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

Configuration for the file logger. More...

#include <FileLogger.hpp>

Public Attributes

std::string directory = "logs"
 Directory where log files are stored.
 
bool async = true
 Flag indicating whether logging should be asynchronous.
 
int auto_delete_days = 30
 Number of days after which old log files are deleted.
 
uint64_t max_file_size_bytes = 0
 Max size for log file before rotation (0 = off).
 
uint32_t max_rotated_files = 0
 Number of rotated files to keep (0 = unlimited).
 
CompressType compress = CompressType::NONE
 Compression algorithm for rotated files.
 
int compress_level = 1
 Compression level.
 
bool compress_async = true
 Run compression in background thread.
 
std::string external_cmd
 External command template.
 
RotationNaming naming = RotationNaming::Sequence
 Naming policy for rotated files.
 
uint32_t seq_width = 3
 Width of sequence index.
 
bool use_dedicated_executor = false
 Use a dedicated executor instead of the global TaskExecutor; native builds create one worker thread per logger.
 
std::size_t queue_capacity = 0
 Maximum queue size for the dedicated executor (0 = unlimited).
 
QueuePolicy queue_policy = QueuePolicy::Block
 Overflow policy for the dedicated executor.
 

Detailed Description

Configuration for the file logger.

Definition at line 95 of file FileLogger.hpp.

Member Data Documentation

◆ async

bool logit::FileLogger::Config::async = true

Flag indicating whether logging should be asynchronous.

Definition at line 97 of file FileLogger.hpp.

◆ auto_delete_days

int logit::FileLogger::Config::auto_delete_days = 30

Number of days after which old log files are deleted.

Definition at line 98 of file FileLogger.hpp.

◆ compress

CompressType logit::FileLogger::Config::compress = CompressType::NONE

Compression algorithm for rotated files.

Definition at line 101 of file FileLogger.hpp.

◆ compress_async

bool logit::FileLogger::Config::compress_async = true

Run compression in background thread.

Definition at line 103 of file FileLogger.hpp.

◆ compress_level

int logit::FileLogger::Config::compress_level = 1

Compression level.

Definition at line 102 of file FileLogger.hpp.

◆ directory

std::string logit::FileLogger::Config::directory = "logs"

Directory where log files are stored.

Definition at line 96 of file FileLogger.hpp.

◆ external_cmd

std::string logit::FileLogger::Config::external_cmd

External command template.

Definition at line 104 of file FileLogger.hpp.

◆ max_file_size_bytes

uint64_t logit::FileLogger::Config::max_file_size_bytes = 0

Max size for log file before rotation (0 = off).

Definition at line 99 of file FileLogger.hpp.

◆ max_rotated_files

uint32_t logit::FileLogger::Config::max_rotated_files = 0

Number of rotated files to keep (0 = unlimited).

Definition at line 100 of file FileLogger.hpp.

◆ naming

RotationNaming logit::FileLogger::Config::naming = RotationNaming::Sequence

Naming policy for rotated files.

Definition at line 105 of file FileLogger.hpp.

◆ queue_capacity

std::size_t logit::FileLogger::Config::queue_capacity = 0

Maximum queue size for the dedicated executor (0 = unlimited).

Definition at line 108 of file FileLogger.hpp.

◆ queue_policy

QueuePolicy logit::FileLogger::Config::queue_policy = QueuePolicy::Block

Overflow policy for the dedicated executor.

Definition at line 109 of file FileLogger.hpp.

◆ seq_width

uint32_t logit::FileLogger::Config::seq_width = 3

Width of sequence index.

Definition at line 106 of file FileLogger.hpp.

◆ use_dedicated_executor

bool logit::FileLogger::Config::use_dedicated_executor = false

Use a dedicated executor instead of the global TaskExecutor; native builds create one worker thread per logger.

Definition at line 107 of file FileLogger.hpp.


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