|
ReXGlue SDK
|
#include <array>#include <atomic>#include <cstddef>#include <cstdlib>#include <exception>#include <format>#include <optional>#include <string>#include <string_view>#include <utility>#include <rex/platform.h>#include <rex/result.h>#include <rex/types.h>#include <rex/utility.h>Go to the source code of this file.
Classes | |
| class | rex::log::LogCategory |
| struct | rex::log::CategoryState |
| class | rex::log::OncePerKey< Count > |
Namespaces | |
| namespace | rex |
| namespace | rex::log |
Macros | |
| #define | REXLOG_CATEGORY(name, description) |
| #define | REXLOG_TABLE(table, ...) |
| #define | REXLOG_DETAIL_WRITE(cat, level, fmt, ...) |
| #define | REXLOG_CAT_ONCE(cat, level, once, key, fmt, ...) |
| #define | REXLOG_CAT_TRACE(cat, fmt, ...) |
| #define | REXLOG_CAT_DEV(cat, fmt, ...) |
| #define | REXLOG_CAT_DEBUG(cat, fmt, ...) |
| #define | REXLOG_CAT_INFO(cat, fmt, ...) |
| #define | REXLOG_CAT_WARN(cat, fmt, ...) |
| #define | REXLOG_CAT_ERROR(cat, fmt, ...) |
| #define | REXLOG_CAT_CRITICAL(cat, fmt, ...) |
| #define | REX_CAT_FAIL(cat, value, fmt, ...) |
| #define | REX_CAT_FATAL(cat, fmt, ...) |
| #define | REX_CAT_CHECK(cat, cond, fmt, ...) |
| #define | REXLOG_TRACE(fmt, ...) |
| #define | REXLOG_DEV(fmt, ...) |
| #define | REXLOG_DEBUG(fmt, ...) |
| #define | REXLOG_INFO(fmt, ...) |
| #define | REXLOG_WARN(fmt, ...) |
| #define | REXLOG_ERROR(fmt, ...) |
| #define | REXLOG_CRITICAL(fmt, ...) |
| #define | REXLOG_WARN_ONCE(once, key, fmt, ...) |
| #define | REX_FAIL(value, fmt, ...) |
| #define | REX_FATAL(fmt, ...) |
| #define | REX_CHECK(cond, fmt, ...) |
| #define | REXSYS_TRACE(fmt, ...) |
| #define | REXSYS_DEV(fmt, ...) |
| #define | REXSYS_DEBUG(fmt, ...) |
| #define | REXSYS_INFO(fmt, ...) |
| #define | REXSYS_WARN(fmt, ...) |
| #define | REXSYS_ERROR(fmt, ...) |
| #define | REXSYS_CRITICAL(fmt, ...) |
| #define | REXSYS_WARN_ONCE(once, key, fmt, ...) |
| #define | REXSYS_FAIL(value, fmt, ...) |
| #define | REXSYS_FATAL(fmt, ...) |
| #define | REXSYS_CHECK(cond, fmt, ...) |
| #define | REXAPU_TRACE(fmt, ...) |
| #define | REXAPU_DEV(fmt, ...) |
| #define | REXAPU_DEBUG(fmt, ...) |
| #define | REXAPU_INFO(fmt, ...) |
| #define | REXAPU_WARN(fmt, ...) |
| #define | REXAPU_ERROR(fmt, ...) |
| #define | REXAPU_CRITICAL(fmt, ...) |
| #define | REXAPU_WARN_ONCE(once, key, fmt, ...) |
| #define | REXAPU_FAIL(value, fmt, ...) |
| #define | REXAPU_FATAL(fmt, ...) |
| #define | REXAPU_CHECK(cond, fmt, ...) |
| #define | REXFS_TRACE(fmt, ...) |
| #define | REXFS_DEV(fmt, ...) |
| #define | REXFS_DEBUG(fmt, ...) |
| #define | REXFS_INFO(fmt, ...) |
| #define | REXFS_WARN(fmt, ...) |
| #define | REXFS_ERROR(fmt, ...) |
| #define | REXFS_CRITICAL(fmt, ...) |
| #define | REXFS_WARN_ONCE(once, key, fmt, ...) |
| #define | REXFS_FAIL(value, fmt, ...) |
| #define | REXFS_FATAL(fmt, ...) |
| #define | REXFS_CHECK(cond, fmt, ...) |
| #define | REXGPU_TRACE(fmt, ...) |
| #define | REXGPU_DEV(fmt, ...) |
| #define | REXGPU_DEBUG(fmt, ...) |
| #define | REXGPU_INFO(fmt, ...) |
| #define | REXGPU_WARN(fmt, ...) |
| #define | REXGPU_ERROR(fmt, ...) |
| #define | REXGPU_CRITICAL(fmt, ...) |
| #define | REXGPU_WARN_ONCE(once, key, fmt, ...) |
| #define | REXGPU_FAIL(value, fmt, ...) |
| #define | REXGPU_FATAL(fmt, ...) |
| #define | REXGPU_CHECK(cond, fmt, ...) |
| #define | REXHID_TRACE(fmt, ...) |
| #define | REXHID_DEV(fmt, ...) |
| #define | REXHID_DEBUG(fmt, ...) |
| #define | REXHID_INFO(fmt, ...) |
| #define | REXHID_WARN(fmt, ...) |
| #define | REXHID_ERROR(fmt, ...) |
| #define | REXHID_CRITICAL(fmt, ...) |
| #define | REXHID_WARN_ONCE(once, key, fmt, ...) |
| #define | REXHID_FAIL(value, fmt, ...) |
| #define | REXHID_FATAL(fmt, ...) |
| #define | REXHID_CHECK(cond, fmt, ...) |
| #define | REXCPU_TRACE(fmt, ...) |
| #define | REXCPU_DEV(fmt, ...) |
| #define | REXCPU_DEBUG(fmt, ...) |
| #define | REXCPU_INFO(fmt, ...) |
| #define | REXCPU_WARN(fmt, ...) |
| #define | REXCPU_ERROR(fmt, ...) |
| #define | REXCPU_CRITICAL(fmt, ...) |
| #define | REXCPU_WARN_ONCE(once, key, fmt, ...) |
| #define | REXCPU_FAIL(value, fmt, ...) |
| #define | REXCPU_FATAL(fmt, ...) |
| #define | REXCPU_CHECK(cond, fmt, ...) |
| #define | REXUI_TRACE(fmt, ...) |
| #define | REXUI_DEV(fmt, ...) |
| #define | REXUI_DEBUG(fmt, ...) |
| #define | REXUI_INFO(fmt, ...) |
| #define | REXUI_WARN(fmt, ...) |
| #define | REXUI_ERROR(fmt, ...) |
| #define | REXUI_CRITICAL(fmt, ...) |
| #define | REXUI_WARN_ONCE(once, key, fmt, ...) |
| #define | REXUI_FAIL(value, fmt, ...) |
| #define | REXUI_FATAL(fmt, ...) |
| #define | REXUI_CHECK(cond, fmt, ...) |
| #define | REXCON_TRACE(fmt, ...) |
| #define | REXCON_DEV(fmt, ...) |
| #define | REXCON_DEBUG(fmt, ...) |
| #define | REXCON_INFO(fmt, ...) |
| #define | REXCON_WARN(fmt, ...) |
| #define | REXCON_ERROR(fmt, ...) |
| #define | REXCON_CRITICAL(fmt, ...) |
| #define | REXCON_WARN_ONCE(once, key, fmt, ...) |
| #define | REXCON_FAIL(value, fmt, ...) |
| #define | REXCON_FATAL(fmt, ...) |
| #define | REXCON_CHECK(cond, fmt, ...) |
Enumerations | |
| enum class | rex::log::Level : u8 { rex::log::kTrace , rex::log::kDev , rex::log::kDebug , rex::log::kInfo , rex::log::kWarn , rex::log::kError , rex::log::kCritical , rex::log::kOff } |
Functions | |
| Result< Level > | rex::log::ParseLevel (std::string_view text) |
| std::string_view | rex::log::LevelName (Level level) |
| void | rex::log::Flush () |
| template<typename Fn> | |
| void | rex::log::NoThrow (const LogCategory &category, Fn &&fn) noexcept |
Variables | |
| constexpr std::array< std::string_view, 8 > | rex::log::kLevelNames |
| constexpr size_t | rex::log::kMessageLevelCount = 7 |
| #define REX_CAT_CHECK | ( | cat, | |
| cond, | |||
| fmt, | |||
| ... ) |
Writes a Critical message, flushes every sink and aborts when a condition is false.
| cat | A rex::log::LogCategory lvalue. |
| cond | The condition that must hold. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REX_CAT_FAIL | ( | cat, | |
| value, | |||
| fmt, | |||
| ... ) |
Writes an Error message and returns a value from the enclosing function.
| cat | A rex::log::LogCategory lvalue. |
| value | The expression the enclosing function returns. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REX_CAT_FATAL | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Critical message, flushes every sink and aborts.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REX_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REX_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REX_FATAL | ( | fmt, | |
| ... ) |
| #define REXAPU_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXAPU_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXAPU_DEBUG | ( | fmt, | |
| ... ) |
| #define REXAPU_DEV | ( | fmt, | |
| ... ) |
| #define REXAPU_ERROR | ( | fmt, | |
| ... ) |
| #define REXAPU_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXAPU_FATAL | ( | fmt, | |
| ... ) |
| #define REXAPU_INFO | ( | fmt, | |
| ... ) |
| #define REXAPU_TRACE | ( | fmt, | |
| ... ) |
| #define REXAPU_WARN | ( | fmt, | |
| ... ) |
| #define REXAPU_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXCON_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXCON_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXCON_DEBUG | ( | fmt, | |
| ... ) |
| #define REXCON_DEV | ( | fmt, | |
| ... ) |
| #define REXCON_ERROR | ( | fmt, | |
| ... ) |
| #define REXCON_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXCON_FATAL | ( | fmt, | |
| ... ) |
| #define REXCON_INFO | ( | fmt, | |
| ... ) |
| #define REXCON_TRACE | ( | fmt, | |
| ... ) |
| #define REXCON_WARN | ( | fmt, | |
| ... ) |
| #define REXCON_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXCPU_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXCPU_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXCPU_DEBUG | ( | fmt, | |
| ... ) |
| #define REXCPU_DEV | ( | fmt, | |
| ... ) |
| #define REXCPU_ERROR | ( | fmt, | |
| ... ) |
| #define REXCPU_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXCPU_FATAL | ( | fmt, | |
| ... ) |
| #define REXCPU_INFO | ( | fmt, | |
| ... ) |
| #define REXCPU_TRACE | ( | fmt, | |
| ... ) |
| #define REXCPU_WARN | ( | fmt, | |
| ... ) |
| #define REXCPU_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXFS_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXFS_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXFS_DEBUG | ( | fmt, | |
| ... ) |
| #define REXFS_DEV | ( | fmt, | |
| ... ) |
| #define REXFS_ERROR | ( | fmt, | |
| ... ) |
| #define REXFS_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXFS_FATAL | ( | fmt, | |
| ... ) |
| #define REXFS_INFO | ( | fmt, | |
| ... ) |
| #define REXFS_TRACE | ( | fmt, | |
| ... ) |
| #define REXFS_WARN | ( | fmt, | |
| ... ) |
| #define REXFS_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXGPU_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXGPU_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXGPU_DEBUG | ( | fmt, | |
| ... ) |
| #define REXGPU_DEV | ( | fmt, | |
| ... ) |
| #define REXGPU_ERROR | ( | fmt, | |
| ... ) |
| #define REXGPU_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXGPU_FATAL | ( | fmt, | |
| ... ) |
| #define REXGPU_INFO | ( | fmt, | |
| ... ) |
| #define REXGPU_TRACE | ( | fmt, | |
| ... ) |
| #define REXGPU_WARN | ( | fmt, | |
| ... ) |
| #define REXGPU_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXHID_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXHID_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXHID_DEBUG | ( | fmt, | |
| ... ) |
| #define REXHID_DEV | ( | fmt, | |
| ... ) |
| #define REXHID_ERROR | ( | fmt, | |
| ... ) |
| #define REXHID_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXHID_FATAL | ( | fmt, | |
| ... ) |
| #define REXHID_INFO | ( | fmt, | |
| ... ) |
| #define REXHID_TRACE | ( | fmt, | |
| ... ) |
| #define REXHID_WARN | ( | fmt, | |
| ... ) |
| #define REXHID_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXLOG_CAT_CRITICAL | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Critical message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_DEBUG | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Debug message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_DEV | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Dev message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_ERROR | ( | cat, | |
| fmt, | |||
| ... ) |
Writes an Error message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_INFO | ( | cat, | |
| fmt, | |||
| ... ) |
Writes an Info message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_ONCE | ( | cat, | |
| level, | |||
| once, | |||
| key, | |||
| fmt, | |||
| ... ) |
Writes a message when the category is enabled and the key has not written yet.
| cat | A rex::log::LogCategory lvalue. |
| level | A rex::log::Level. |
| once | A rex::log::OncePerKey lvalue. |
| key | The key, written once per distinct value. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_TRACE | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Trace message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CAT_WARN | ( | cat, | |
| fmt, | |||
| ... ) |
Writes a Warn message.
| cat | A rex::log::LogCategory lvalue. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_CATEGORY | ( | name, | |
| description ) |
Declares the log category rex::log::name. Used at global scope in a header that every writer of the category includes.
| name | Category name, a lowercase identifier. |
| description | Shown by the console. |
| #define REXLOG_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXLOG_DEBUG | ( | fmt, | |
| ... ) |
| #define REXLOG_DETAIL_WRITE | ( | cat, | |
| level, | |||
| fmt, | |||
| ... ) |
Writes a message when the category is enabled at the level, else evaluates no arguments.
| cat | A rex::log::LogCategory lvalue. |
| level | A rex::log::Level. |
| fmt | std::format string literal. |
| ... | Format arguments. |
| #define REXLOG_DEV | ( | fmt, | |
| ... ) |
| #define REXLOG_ERROR | ( | fmt, | |
| ... ) |
| #define REXLOG_INFO | ( | fmt, | |
| ... ) |
| #define REXLOG_TABLE | ( | table, | |
| ... ) |
Declares rex::log::table, the category addresses a module passes to Logger::AddCategories. Used at global scope.
| table | The identifier of the generated table, such as kGPULog. |
| ... | Category names. |
| #define REXLOG_TRACE | ( | fmt, | |
| ... ) |
| #define REXLOG_WARN | ( | fmt, | |
| ... ) |
| #define REXLOG_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXSYS_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXSYS_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXSYS_DEBUG | ( | fmt, | |
| ... ) |
| #define REXSYS_DEV | ( | fmt, | |
| ... ) |
| #define REXSYS_ERROR | ( | fmt, | |
| ... ) |
| #define REXSYS_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXSYS_FATAL | ( | fmt, | |
| ... ) |
| #define REXSYS_INFO | ( | fmt, | |
| ... ) |
| #define REXSYS_TRACE | ( | fmt, | |
| ... ) |
| #define REXSYS_WARN | ( | fmt, | |
| ... ) |
| #define REXSYS_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |
| #define REXUI_CHECK | ( | cond, | |
| fmt, | |||
| ... ) |
| #define REXUI_CRITICAL | ( | fmt, | |
| ... ) |
| #define REXUI_DEBUG | ( | fmt, | |
| ... ) |
| #define REXUI_DEV | ( | fmt, | |
| ... ) |
| #define REXUI_ERROR | ( | fmt, | |
| ... ) |
| #define REXUI_FAIL | ( | value, | |
| fmt, | |||
| ... ) |
| #define REXUI_FATAL | ( | fmt, | |
| ... ) |
| #define REXUI_INFO | ( | fmt, | |
| ... ) |
| #define REXUI_TRACE | ( | fmt, | |
| ... ) |
| #define REXUI_WARN | ( | fmt, | |
| ... ) |
| #define REXUI_WARN_ONCE | ( | once, | |
| key, | |||
| fmt, | |||
| ... ) |