|
| const char * | tachyon::Diagnostics::LogSeverityName (LogSeverity severity) |
| constexpr LogCategory | tachyon::Diagnostics::MakeLogCategory (std::string_view staticName) |
| | A category named staticName, which must be a static string.
|
| template<typename T> |
| LogArg | tachyon::Diagnostics::MakeLogArg (const T &value) |
| std::string_view | tachyon::Diagnostics::LogArgText (const LogRecord &record, const LogArg &arg) |
| size_t | tachyon::Diagnostics::FormatLogMessage (const LogRecord &record, std::span< char > out) |
| | Writes the template with its arguments substituted, NUL-terminated and truncated to out.
|
| void | tachyon::Diagnostics::SetLogConsoleOutput (bool enabled) |
| | Turns the built-in stdout/stderr/debugger sink on or off (on by default). [AnyThread].
|
| bool | tachyon::Diagnostics::AddLogSink (LogSinkFn sink, void *context) |
| | Registers sink, called with every record and context.
|
| void | tachyon::Diagnostics::RemoveLogSink (LogSinkFn sink, void *context) |
| | Unregisters a sink added with the same sink and context. [MainThread].
|
| void | tachyon::Diagnostics::LogMessage (LogCategory category, LogSeverity severity, std::string_view messageTemplate, std::span< const LogArg > args, const char *file="", uint32_t line=0) |
| | Emits one record. Prefer the TACHYON_LOG_* macros, which add the source location. [AnyThread].
|
| void | tachyon::Diagnostics::ReportMisuse (LogCategory category, const char *message) |
| | API misuse (an unbalanced Begin/End, a call outside its frame, ...) is reported, not fatal: the caller recovers and the app carries on.
|
| void | tachyon::Diagnostics::ResetMisuseReports () |
| | Lets every misuse be reported again (tests). [AnyThread].
|
| uint64_t | tachyon::Diagnostics::LatestLogSequence () |
| | Sequence number of the newest record (0 before the first). [AnyThread].
|
| uint32_t | tachyon::Diagnostics::CopyRecentLogRecords (std::span< LogRecord > out) |
| | Copies up to out.size() of the most recent records, oldest first.
|
| template<typename... Args> |
| void | tachyon::Diagnostics::Log (LogCategory category, LogSeverity severity, const char *file, uint32_t line, std::string_view messageTemplate, const Args &... args) |
| | Emits a record with args (at most kMaxLogArgs) for the {} in messageTemplate; what the TACHYON_LOG_* macros call.
|