File logging.hpp๏
Define the logging utilities for nuTens.
Basically just use spdlog interface. However we define our own log levels and macros and pass them through to the logging library. This is juuust in case we ever want to change the logging library we use. This way only this file would need to change.
Defines
-
SPDLOG_ACTIVE_LEVEL๏
-
NT_TRACE(...)๏
Trace message that will only be displayed if NT_LOG_LEVEL == NT_LOG_LEVEL_TRACE.
- Parameters:
... โ [in] The message to print. This can consist of just a simple string, or a format string and subsequent variables to format.
-
NT_DEBUG(...)๏
Debug message that will only be displayed if NT_LOG_LEVEL <= NT_LOG_LEVEL_DEBUG.
- Parameters:
... โ [in] The message to print. This can consist of just a simple string, or a format string and subsequent variables to format.
-
NT_INFO(...)๏
Information message that will only be displayed if NT_LOG_LEVEL <= NT_LOG_LEVEL_INFO.
- Parameters:
... โ [in] The message to print. This can consist of just a simple string, or a format string and subsequent variables to format.
-
NT_WARN(...)๏
Warning message that will only be displayed if NT_LOG_LEVEL <= NT_LOG_LEVEL_WARNING.
- Parameters:
... โ [in] The message to print. This can consist of just a simple string, or a format string and subsequent variables to format.
-
NT_ERROR(...)๏
Error message that will only be displayed if NT_LOG_LEVEL <= NT_LOG_LEVEL_ERROR.
- Parameters:
... โ [in] The message to print. This can consist of just a simple string, or a format string and subsequent variables to format.
Variables
-
constexpr size_t NT_LOG_LEVEL_TRACE = 0๏
-
constexpr size_t NT_LOG_LEVEL_DEBUG = 1๏
-
constexpr size_t NT_LOG_LEVEL_INFO = 2๏
-
constexpr size_t NT_LOG_LEVEL_WARNING = 3๏
-
constexpr size_t NT_LOG_LEVEL_ERROR = 4๏
-
constexpr size_t NT_LOG_LEVEL_SILENT = 5๏
-
static const spdlog::level::level_enum runtimeLogLevel = spdlog::level::trace๏