|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Abstract interface for logger configuration strategies. More...
#include <config_strategy_interface.h>


Public Member Functions | |
| virtual | ~config_strategy_interface ()=default |
| virtual std::string | get_name () const =0 |
| Get the strategy name. | |
| virtual void | apply (logger_config &config) const =0 |
| Apply this strategy to a logger configuration. | |
| virtual bool | is_applicable () const |
| Check if this strategy is applicable in the current context. | |
| virtual int | priority () const |
| Get the strategy priority. | |
Abstract interface for logger configuration strategies.
Configuration strategies allow dynamic modification of logger settings based on various contexts (environment, performance needs, etc.). Multiple strategies can be composed and applied in priority order.
Definition at line 36 of file config_strategy_interface.h.
|
virtualdefault |
|
pure virtual |
Apply this strategy to a logger configuration.
| config | The configuration to modify |
Modifies the provided configuration according to the strategy's rules. Changes are applied in-place.
Implemented in kcenon::logger::composite_strategy, kcenon::logger::deployment_strategy, kcenon::logger::environment_strategy, and kcenon::logger::performance_strategy.
|
pure virtual |
Get the strategy name.
Implemented in kcenon::logger::composite_strategy, kcenon::logger::deployment_strategy, kcenon::logger::environment_strategy, and kcenon::logger::performance_strategy.
|
inlinevirtual |
Check if this strategy is applicable in the current context.
Override to implement conditional strategy application (e.g., only apply in certain environments).
Reimplemented in kcenon::logger::composite_strategy, and kcenon::logger::environment_strategy.
Definition at line 62 of file config_strategy_interface.h.
|
inlinevirtual |
Get the strategy priority.
When multiple strategies are applied, they are sorted by priority (descending) before application.
Reimplemented in kcenon::logger::deployment_strategy, kcenon::logger::environment_strategy, and kcenon::logger::performance_strategy.
Definition at line 71 of file config_strategy_interface.h.