Skip to content

ludus::foundation::logging::LogSystem

Ludus Wiki · API overview · Browse API

Class

Lifecycle and control surface.
Normal engine code uses the LUDUS_LOG_* macros almost exclusively; this class is for startup, diagnostics, and tools.

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

#include <ludus/foundation/logging/log_system.hpp>
class ludus::foundation::logging::LogSystem

Static methods

Initialize

static LogInitResult ludus::foundation::logging::LogSystem::Initialize(const LogConfig &config)
Web builds run on the browser main thread, always synchronously.
Requests for async, file, or debugger sinks return Degraded with Synchronous mode; unsupported requested sinks report unhealthy. No timed flush worker runs. Reentrant console callbacks cannot change lifecycle (Incomplete). Native async-owner allocation failure returns Degraded with Synchronous mode, retaining initialized sinks and disabling the timed flush worker; explicit and shutdown flushes remain available.

Related types: LogConfig · LogInitResult

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

Shutdown

static LogStatus ludus::foundation::logging::LogSystem::Shutdown()

Related types: LogStatus

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

Flush

static FlushResult ludus::foundation::logging::LogSystem::Flush(FlushKind kind=FlushKind::Visible, uint32 timeoutMilliseconds=1000)
Acknowledged flush: waits (up to timeoutMilliseconds) for all records accepted before the call to be processed and the selected local sinks to complete the requested flush kind, then reports status and the acknowledged sequence (requirements R28, R29).
A timeout is honest: it cannot cancel an in-progress blocking OS write. Web Visible acknowledges completed synchronous console calls; Durable returns Unsupported. Neither promises developer-tools display or disk persistence. A failed console call returns SinkFailed until recovery.

Related types: uint32 · FlushKind · FlushResult

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

SetGlobalLevel

static void ludus::foundation::logging::LogSystem::SetGlobalLevel(LogLevel level)

Related types: LogLevel

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

SetCategoryLevel

static void ludus::foundation::logging::LogSystem::SetCategoryLevel(LogCategory category, LogLevel level)

Related types: LogLevel · LogCategory

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

ClearCategoryLevels

static void ludus::foundation::logging::LogSystem::ClearCategoryLevels()

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

Statistics

static LogStatistics ludus::foundation::logging::LogSystem::Statistics()

Related types: LogStatistics

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

Health

static LogHealth ludus::foundation::logging::LogSystem::Health()

Related types: LogHealth

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

IsInitialized

static bool ludus::foundation::logging::LogSystem::IsInitialized() noexcept
True between a successful Initialize() and Shutdown().
Normal code never needs to check this before logging; it exists for tests and diagnostics.

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