|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
Process-wide logger. More...
#include <logger.hpp>
Public Types | |
| using | Sink = std::function<void(LogLevel, std::string_view, std::string_view )> |
Public Member Functions | |
| Logger (const Logger &)=delete | |
| Logger & | operator= (const Logger &)=delete |
| Logger (Logger &&)=delete | |
| Logger & | operator= (Logger &&)=delete |
| void | set_sink (Sink sink) |
| void | set_level (LogLevel level) noexcept |
| LogLevel | level () const noexcept |
| void | log (LogLevel level, std::string_view category, std::string_view message) noexcept |
| Invoke the current sink without copying its captures. | |
| void | trace (std::string_view category, std::string_view m) |
| void | debug (std::string_view category, std::string_view m) |
| void | info (std::string_view category, std::string_view m) |
| void | warn (std::string_view category, std::string_view m) |
| void | error (std::string_view category, std::string_view m) |
| void | fatal (std::string_view category, std::string_view m) |
Static Public Member Functions | |
| static Logger & | instance () noexcept |
| Get the singleton (resolved from the runtime shared library, never duplicated). | |
Process-wide logger.
Implementation lives in the runtime shared library, so there is exactly one global sink across all modules.
| using aria::runtime::Logger::Sink = std::function<void(LogLevel, std::string_view, std::string_view )> |
|
delete |
|
delete |
|
staticnoexcept |
Get the singleton (resolved from the runtime shared library, never duplicated).
| void aria::runtime::Logger::set_sink | ( | Sink | sink | ) |
|
noexcept |
|
nodiscardnoexcept |
|
noexcept |
Invoke the current sink without copying its captures.
Sink exceptions and recursive logging fall back to stderr.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |