Skip to content

ludus::foundation::logging::LogConfig

Ludus Wiki · API overview · Browse API

Struct

Runtime configuration passed to LogSystem::Initialize.

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

#include <ludus/foundation/logging/log_system.hpp>
struct ludus::foundation::logging::LogConfig

Fields

GlobalLevel

LogLevel ludus::foundation::logging::LogConfig::GlobalLevel = LogLevel::Info

Related types: LogLevel

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

Mode

LogMode ludus::foundation::logging::LogConfig::Mode = LogMode::Synchronous

Related types: LogMode

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

EnableConsole

bool ludus::foundation::logging::LogConfig::EnableConsole = true

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

EnableFile

bool ludus::foundation::logging::LogConfig::EnableFile = true

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

EnableDebugger

bool ludus::foundation::logging::LogConfig::EnableDebugger = true

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

Directory

std::string_view ludus::foundation::logging::LogConfig::Directory
Writable directory for the session file, resolved by the application / platform bootstrap and injected here as a borrowed UTF-8 path.
Copied during Initialize(); the caller need not keep it alive afterward. When empty, the file sink is disabled and a diagnostic is emitted on the emergency path rather than guessing a directory (requirements R47).

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

FlushIntervalMilliseconds

uint32 ludus::foundation::logging::LogConfig::FlushIntervalMilliseconds = 1000
Timed flush cadence for the file sink.
Honored by the backend (requirements R46). 0 disables timed flushing (records still flush on shutdown, on urgent events, and on explicit Flush()).

Related types: uint32

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

MaxFileSizeBytes

uint64 ludus::foundation::logging::LogConfig::MaxFileSizeBytes = 32ull * 1024ull * 1024ull
Per-session storage bounds.
A record-boundary rotation triggers when a segment would exceed MaxFileSizeBytes; MaxTotalBytes / MaxSessionAgeDays bound retained storage across sessions (requirements R44). 0 means "no limit for this dimension" and is documented, not implicit.

Related types: uint64

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

MaxTotalBytes

uint64 ludus::foundation::logging::LogConfig::MaxTotalBytes = 0
0 = unbounded total (bounded by RetainedSessions/age)

Related types: uint64

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

MaxSessionAgeDays

uint32 ludus::foundation::logging::LogConfig::MaxSessionAgeDays = 0
0 = no age cap

Related types: uint32

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp

RetainedSessions

uint32 ludus::foundation::logging::LogConfig::RetainedSessions = 10
0 = keep all

Related types: uint32

Declared in modules/foundation/logging/include/ludus/foundation/logging/log_system.hpp