128 config.
async =
false;
144 default:
return "unknown";
Abstract interface for logger configuration strategies.
Configuration strategy based on deployment environment.
void apply(logger_config &config) const override
Apply this strategy to a logger configuration.
int priority() const override
Get the strategy priority.
static void apply_staging(logger_config &config)
deployment_strategy(deployment_env env)
Constructor with deployment environment.
std::string get_name() const override
Get the strategy name.
static void apply_development(logger_config &config)
static std::string env_to_string(deployment_env env)
static void apply_testing(logger_config &config)
static void apply_production(logger_config &config)
Interface for logger configuration strategies (Strategy Pattern)
Configuration structure for logger with validation.
deployment_env
Deployment environment types.
@ development
Development environment (verbose, colorful)
@ staging
Staging environment (JSON, file + console)
@ testing
Testing environment (memory buffer, sync)
@ production
Production environment (optimized, safe)
Configuration structure for logger with validation.
log_level min_level
Minimum log level to process.
std::size_t batch_size
Number of messages per batch write.
bool enable_batch_writing
Enable batch writing mode.
std::size_t max_file_size
Maximum file size in bytes (default: 100MB).
bool async
Enable asynchronous logging.
bool enable_color_output
Enable ANSI color output.
overflow_policy queue_overflow_policy
Active overflow policy.
bool enable_source_location
Include source file/line in log entries.
bool enable_compression
Enable log compression.
bool enable_metrics
Enable performance metrics collection.
std::chrono::milliseconds flush_interval
Interval between automatic flushes.
std::size_t buffer_size
Internal buffer size in bytes.
std::size_t max_file_count
Maximum number of rotating log files.
bool enable_crash_handler
Enable crash signal handler.
bool enable_structured_logging
Enable structured (JSON) log output.