|
Mila
Deep Neural Network Library
|
Abstract logging interface and static facade for the Mila logging infrastructure. More...
#include <source_location>#include <stdexcept>#include <string_view>Classes | |
| class | Mila::Logging::Logger |
| Abstract logging interface and static facade. More... | |
Namespaces | |
| namespace | Mila |
| Mila main API namespace. | |
Enumerations | |
| enum class | Mila::Logging::LogLevel { Trace , Debug , Info , Warning , Error , Critical , None } |
| Severity levels for log records, ordered from most verbose to most severe. More... | |
Abstract logging interface and static facade for the Mila logging infrastructure.
Defines the Logger base class, the LogLevel enumeration, and the static convenience methods that form the primary call-site API. Concrete sink implementations (ConsoleSink, FileSink, NullSink) derive from Logger and are registered via setDefaultLogger().
Message formatting is the caller's responsibility. Use std::format at the call site before passing the result to a log method:
A default logger must be registered via setDefaultLogger() before any log call is made. Failure to do so will throw std::runtime_error. The correct place to register is Mila::initialize(). For test harnesses that want silent logging, register a NullSink.
|
exportstrong |
Severity levels for log records, ordered from most verbose to most severe.
A sink configured at a given level will emit all records at that level and above. For example, a sink at Warning will emit Warning, Error, and Critical records and discard Trace, Debug, and Info.