[*] 260e33fd cont again

This commit is contained in:
Reece Wilson 2024-02-18 18:11:11 +00:00
parent 3732352b4e
commit 97bf497ec0

View File

@ -37,32 +37,32 @@ namespace Aurora::Logging
#if defined(_AUHAS_FMT)
template<typename ... T>
inline void WriteLinef(AuUInt8 level, const AuString &tag, const AuString &msg, T&& ... args)
inline void WriteLinef(AuUInt8 level, const AuString &tag, fmt::format_string<T...> msg, T&& ... args)
{
WriteMessage(level, ConsoleMessage(EAnsiColor::eReset, tag, fmt::format(msg, AuForward<T>(args)...)));
}
template<typename ... T>
inline void WriteLinef(AuUInt8 level, EAnsiColor color, const AuString &tag, const AuString &msg, T&& ... args)
inline void WriteLinef(AuUInt8 level, EAnsiColor color, const AuString &tag, fmt::format_string<T...> msg, T&& ... args)
{
WriteMessage(level, ConsoleMessage(color, tag, fmt::format(msg, AuForward<T>(args)...)));
}
template<typename ... T>
inline void LogVerbose(const AuString &line, T&& ... args)
inline void LogVerbose(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", msg, AuForward<T>(args)...);
}
#if defined(STAGING) || defined(DEBUG)
template<typename ... T>
inline void LogVerboseNoShip(const AuString &line, T&& ... args)
inline void LogVerboseNoShip(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eYellow, "Verbose", msg, AuForward<T>(args)...);
}
#else
template<typename ... T>
inline void LogVerboseNoShip(const AuString &line, T&& ... args)
inline void LogVerboseNoShip(fmt::format_string<T...> msg, T&& ... args)
{}
#endif
@ -72,39 +72,39 @@ namespace Aurora::Logging
}
template<typename ... T>
inline void LogInfo(const AuString &line, T&& ... args)
inline void LogInfo(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eInfo), EAnsiColor::eGreen, "Info", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eInfo), EAnsiColor::eGreen, "Info", msg, AuForward<T>(args)...);
}
template<typename ... T>
inline void LogDbg(const AuString &line, T&& ... args)
inline void LogDbg(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eDebug), EAnsiColor::eYellow, "Debug", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eDebug), EAnsiColor::eYellow, "Debug", msg, AuForward<T>(args)...);
}
template<typename ... T>
inline void LogWarn(const AuString &line, T&& ... args)
inline void LogWarn(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eWarn), EAnsiColor::eRed, "Warn", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eWarn), EAnsiColor::eRed, "Warn", msg, AuForward<T>(args)...);
}
template<typename ... T>
inline void LogCritical(const AuString &line, T&& ... args)
inline void LogCritical(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eCritical), EAnsiColor::eBoldRed, "Critical", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eCritical), EAnsiColor::eBoldRed, "Critical", msg, AuForward<T>(args)...);
}
template<typename ... T>
inline void LogError(const AuString &line, T&& ... args)
inline void LogError(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eError), EAnsiColor::eBoldRed, "Error", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eError), EAnsiColor::eBoldRed, "Error", msg, AuForward<T>(args)...);
}
template<typename ... T>
inline void LogGame(const AuString &line, T&& ... args)
inline void LogGame(fmt::format_string<T...> msg, T&& ... args)
{
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eBlue, "Game", line, AuForward<T>(args)...);
WriteLinef(static_cast<AuUInt8>(ELogLevel::eVerbose), EAnsiColor::eBlue, "Game", msg, AuForward<T>(args)...);
}
#endif