AsmGrader 0.0.0
Loading...
Searching...
No Matches
logging.hpp File Reference
#include <asmgrader/common/class_traits.hpp>
#include <asmgrader/common/extra_formatters.hpp>
#include <fmt/chrono.h>
#include <fmt/color.h>
#include <fmt/ranges.h>
#include <cerrno>
#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <spdlog/cfg/env.h>
#include <spdlog/common.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
Include dependency graph for logging.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  asmgrader::detail::DebugTimeHelper
 

Namespaces

namespace  asmgrader
 
namespace  asmgrader::detail
 

Macros

#define SPDLOG_ACTIVE_LEVEL   SPDLOG_LEVEL_INFO
 
#define LOG_TRACE(...)
 
#define LOG_DEBUG(...)
 
#define LOG_INFO(...)
 
#define LOG_WARN(...)
 
#define LOG_ERROR(...)
 
#define LOG_FATAL(...)
 
#define UNIMPLEMENTED(msg, ...)
 For features that have not yet / are not planned to be implemented, so that I don't bang my head against the wall in the future trying to debug something that doesn't exist.
 
#define DEBUG_TIME(fn, ...)
 

Functions

std::string asmgrader::get_err_msg (int err)
 Obtain Linux error code message given by err via libc functions.
 
std::string asmgrader::get_err_msg ()
 Obtain Linux error (i.e., errno) message via libc functions.
 
void asmgrader::init_loggers ()
 

Macro Definition Documentation

◆ DEBUG_TIME

#define DEBUG_TIME ( fn,
... )

◆ LOG_DEBUG

#define LOG_DEBUG ( ...)
Value:
SPDLOG_DEBUG(__VA_ARGS__)

◆ LOG_ERROR

#define LOG_ERROR ( ...)
Value:
SPDLOG_ERROR(__VA_ARGS__)

◆ LOG_FATAL

#define LOG_FATAL ( ...)
Value:
SPDLOG_CRITICAL(__VA_ARGS__)

◆ LOG_INFO

#define LOG_INFO ( ...)
Value:
SPDLOG_INFO(__VA_ARGS__)

◆ LOG_TRACE

#define LOG_TRACE ( ...)
Value:
SPDLOG_TRACE(__VA_ARGS__)

◆ LOG_WARN

#define LOG_WARN ( ...)
Value:
SPDLOG_WARN(__VA_ARGS__)

◆ SPDLOG_ACTIVE_LEVEL

#define SPDLOG_ACTIVE_LEVEL   SPDLOG_LEVEL_INFO

◆ UNIMPLEMENTED

#define UNIMPLEMENTED ( msg,
... )
Value:
do { /* NOLINT(cppcoreguidelines-avoid-do-while) */ \
LOG_FATAL("Feature not implemented! " msg __VA_OPT__(, ) __VA_ARGS__); \
std::abort(); \
} while (false)

For features that have not yet / are not planned to be implemented, so that I don't bang my head against the wall in the future trying to debug something that doesn't exist.