Files
Lioncache 55b88dac24 Log: Move off TString
Reduces dependency on TString.
2026-02-06 11:55:20 -05:00

46 lines
887 B
C++

#ifndef AXIO_LOG_H
#define AXIO_LOG_H
#include <spdlog/spdlog.h>
#include <string>
/** Application logging functionality */
namespace NLog
{
bool InitLog(const std::string& filename);
inline auto Get()
{
return spdlog::get("axio");
}
template <typename... Args>
void Debug(spdlog::format_string_t<Args...> fmt, Args&&... args)
{
Get()->debug(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void Warn(spdlog::format_string_t<Args...> fmt, Args&&... args)
{
Get()->warn(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void Error(spdlog::format_string_t<Args...> fmt, Args&&... args)
{
Get()->error(fmt, std::forward<Args>(args)...);
}
template <typename... Args>
void Fatal(spdlog::format_string_t<Args...> fmt, Args&&... args)
{
Get()->critical(fmt, std::forward<Args>(args)...);
}
} // namespace NLog
#endif // AXIO_LOG_H