|
utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
|
Logging interface with levels, source-location metadata, and stream-style output. More...
#include <atomic>#include <limits>#include <memory>#include <mutex>#include <source_location>#include <sstream>#include <string>#include <type_traits>#include <utility>

Go to the source code of this file.
Classes | |
| struct | utility::logging::LogRecord |
| Structured log record carrying metadata for a single log entry. More... | |
| class | utility::logging::Logger |
| Abstract logger interface defining stream-style logging operations. More... | |
| class | utility::logging::Logger::LogMessage |
| Proxy object returned by debug/info/warning/error. More... | |
Namespaces | |
| namespace | utility |
| The utility namespace contains classes and functions for the utility project. | |
Concepts | |
| concept | utility::logging::InheritFromLogger |
| Concept to ensure a type inherits from Logger. | |
Enumerations | |
| enum class | utility::logging::LogLevel { DEBUG_LEVEL , INFO_LEVEL , WARNING_LEVEL , ERROR_LEVEL } |
| Log severity levels. More... | |
| enum class | utility::logging::FlushPolicy { BUFFERED , ALWAYS , NEVER } |
| Controls when a stream-backed logger flushes its output. More... | |
Logging interface with levels, source-location metadata, and stream-style output.
Defines the utility::Logger abstract base class along with the LogLevel enumeration and LogRecord. Concrete loggers derive from Logger and implement output(const LogRecord&).
Usage: getLogger().debug() << "Entity " << id << " updated";
Definition in file logger.hpp.
|
strong |
Controls when a stream-backed logger flushes its output.
Buffering avoids a per-line flush (std::endl) while still guaranteeing that warnings and errors reach the console promptly.
| Enumerator | |
|---|---|
| BUFFERED | Buffer debug/info; flush warnings/errors (default) |
| ALWAYS | Flush after every message (legacy behavior) |
| NEVER | Never flush except on destruction. |
Definition at line 68 of file logger.hpp.
|
strong |
Log severity levels.
Definition at line 54 of file logger.hpp.