Skip to content

ludus::foundation::logging::LogCategory

Ludus Wiki · API overview · Browse API

Struct

A logging category.
Instances are expected to be declared inline constexpr at namespace scope so their id is computed at compile time and no dynamic registration is needed on the logging hot path. The descriptor stays a literal type (no atomics inside it): per-category runtime overrides live in a separate process-lifetime registry keyed by id (see log_system.hpp / the internal registry), so a category can be declared in a header and filtered safely before any registration runs, and so the hot-path predicate is a small set of scalar loads with no lock or map lookup (requirements R13).

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

#include <ludus/foundation/logging/category.hpp>
struct ludus::foundation::logging::LogCategory

Fields

Id

uint32 ludus::foundation::logging::LogCategory::Id

Related types: uint32

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

Name

std::string_view ludus::foundation::logging::LogCategory::Name

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

Methods

LogCategory

ludus::foundation::logging::LogCategory::LogCategory(std::string_view category_name) noexcept

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

LogCategory

constexpr ludus::foundation::logging::LogCategory::LogCategory(uint32 category_id, std::string_view category_name) noexcept
Explicit two-argument form kept for parity with the specification's examples and for tests that construct categories at runtime.

Related types: uint32

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

Members

operator==

constexpr bool operator==(LogCategory lhs, LogCategory rhs) noexcept

Related types: LogCategory

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