Raito 0.1
Loading...
Searching...
No Matches
Log.h File Reference
#include <string>
#include <spdlog/spdlog.h>
#include <spdlog/fmt/ostr.h>
#include <spdlog/fmt/fmt.h>
Include dependency graph for Log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Raito
 
namespace  Raito::Core
 
namespace  Raito::Core::Debug
 

Macros

#define FMT(...)   fmt::format(__VA_ARGS__)
 Formatting macro.
 
#define LOG(x, ...)   Raito::Core::Debug::Log(x, FMT(__VA_ARGS__))
 
#define F_LOG(...)   Raito::Core::Debug::Log(__FUNCTION__, FMT(__VA__ARGS__))
 
#define WARN(x, ...)   Raito::Core::Debug::LogWarning(x, FMT(__VA_ARGS__))
 
#define F_WARN(...)   Raito::Core::Debug::LogWarning(__FUNCTION__, FMT(__VA_ARGS__))
 
#define ERR(x, ...)   Raito::Core::Debug::LogError(x, FMT(__VA_ARGS__))
 
#define F_ERR(...)   Raito::Core::Debug::LogError(__FUNCTION__, FMT(__VA_ARGS__))
 

Functions

bool Raito::Core::Debug::Initialize (bool logDumps)
 
void Raito::Core::Debug::Log (const std::string &title, const std::string &msg)
 
void Raito::Core::Debug::LogWarning (const std::string &title, const std::string &msg)
 
void Raito::Core::Debug::LogError (const std::string &title, const std::string &msg)
 

Macro Definition Documentation

◆ ERR

#define ERR ( x,
... )   Raito::Core::Debug::LogError(x, FMT(__VA_ARGS__))

Error logging macro where the title is specified

Parameters
xTitle for the log
...Variable arguments to log as a message

◆ F_ERR

#define F_ERR ( ...)    Raito::Core::Debug::LogError(__FUNCTION__, FMT(__VA_ARGS__))

Error logging macro where the title is the function caller name

Parameters
...Variable arguments to log as a message

◆ F_LOG

#define F_LOG ( ...)    Raito::Core::Debug::Log(__FUNCTION__, FMT(__VA__ARGS__))

Information logging macro where the title is the function caller name

Parameters
...Variable arguments to log as a message

◆ F_WARN

#define F_WARN ( ...)    Raito::Core::Debug::LogWarning(__FUNCTION__, FMT(__VA_ARGS__))

Warning logging macro where the title is the function caller name @params ... Variable arguments to log as a message

◆ FMT

#define FMT ( ...)    fmt::format(__VA_ARGS__)

Formatting macro.

◆ LOG

#define LOG ( x,
... )   Raito::Core::Debug::Log(x, FMT(__VA_ARGS__))

Information logging macro where the title is specified

Parameters
xTitle for the log
...Variable arguments to log as a message

◆ WARN

#define WARN ( x,
... )   Raito::Core::Debug::LogWarning(x, FMT(__VA_ARGS__))

Warning logging macro where the title is specified

Parameters
xTitle for the log
...Variable arguments to log as a message