47 lines
1.4 KiB
C++
47 lines
1.4 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Logging.hpp
|
|
Date: 2021-6-9
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Console::Logging
|
|
{
|
|
template<typename ... T>
|
|
static inline void WriteLinef(const AuString &tag, const AuString &msg, T... args)
|
|
{
|
|
Aurora::Console::WriteLine(ConsoleMessage(EAnsiColor::eReset, tag, fmt::format(msg, args...)));
|
|
}
|
|
|
|
template<typename ... T>
|
|
static inline void WriteLinef(EAnsiColor color, const AuString &tag, const AuString &msg, T... args)
|
|
{
|
|
Aurora::Console::WriteLine(ConsoleMessage(color, tag, fmt::format(msg, args...)));
|
|
}
|
|
|
|
template<typename ... T>
|
|
static inline void LogInfo(const AuString &line, T... args)
|
|
{
|
|
Aurora::Console::Logging::WriteLinef(EAnsiColor::eGreen, "Info", line, args...);
|
|
}
|
|
|
|
template<typename ... T>
|
|
static inline void LogDbg(const AuString &line, T... args)
|
|
{
|
|
Aurora::Console::Logging::WriteLinef(EAnsiColor::eYellow, "Debug", line, args...);
|
|
}
|
|
|
|
template<typename ... T>
|
|
static inline void LogWarn(const AuString &line, T... args)
|
|
{
|
|
Aurora::Console::Logging::WriteLinef(EAnsiColor::eRed, "Warn", line, args...);
|
|
}
|
|
|
|
template<typename ... T>
|
|
static inline void LogGame(const AuString &line, T... args)
|
|
{
|
|
Aurora::Console::Logging::WriteLinef(EAnsiColor::eBlue, "Game", line, args...);
|
|
}
|
|
} |