Struct Config
Defined in File config.h
Struct Documentation
-
struct Config
Initial destination and per-Log queue configuration.
Levels may change while open; destination/rotation/overflow changes require a new owned Log or the singleton’s first initialization. Off suppresses output but does not avoid opening the file. Configure before starting producers.
Public Members
-
std::filesystem::path directory = {"logs"}
Destination directory; normalized to absolute during construction, empty resolves to the current directory.
-
std::size_t rotation_bytes = 10 * 1024 * 1024
Positive file rotation size in bytes.
-
std::size_t retained_files = 5
Number of rotated files retained; at most 200000.
-
bool rotate_on_open = true
Whether opening rotates existing destination content.
-
::CE::Logging::Level logger_level = ::CE::Logging::Compile::profile == 2 ? ::CE::Logging::Level::info : ::CE::Logging::Level::debug
Initial category gate; runtime changes do not alter this stored startup snapshot.
-
::CE::Logging::Level file_level = ::CE::Logging::Compile::profile == 2 ? ::CE::Logging::Level::info : ::CE::Logging::Level::debug
Initial file gate, additionally subject to logger gate and compiled mask.
-
::CE::Logging::Level console_level = ::CE::Logging::Compile::profile == 0 ? ::CE::Logging::Level::info : ::CE::Logging::Level::warn
Initial console gate, additionally subject to logger gate and compiled mask.
-
::CE::Logging::OverflowPolicy overflow_policy = ::CE::Logging::OverflowPolicy::Block
Per-Log policy for shared queue saturation; neither mode acknowledges durable output.
Public Static Functions
-
static inline Config for_logger(const char *name, const ::CE::Logging::Profile profile = static_cast<::CE::Logging::Profile>(::CE::Logging::Compile::profile))
Declaration:
[[nodiscard]]Build profile defaults, including the quieter memory category.
See also
- Parameters:
name – Borrowed category name used only to select defaults; nullptr is permitted here, but logger construction still requires a valid filename component.
profile – Runtime default profile; cannot restore severities excluded at compile time.
- Throws:
CE::Exceptions::invalid_args – For an unknown profile. Developer/Support use debug file/logger gates and info/warn console respectively; Release uses info file/logger and warn console. The memory category uses info, or warn in Release.
- Returns:
Owned initial settings; creates no directory, file or logger.
-
std::filesystem::path directory = {"logs"}