[Logger] Make debug text less lengthy

This commit is contained in:
Diavolo 2022-07-02 11:41:59 +02:00
parent 22d57a675e
commit 69bbdc0e9d
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -50,11 +50,11 @@ namespace Components
void Logger::DebugInternal(std::string_view fmt, std::format_args&& args, [[maybe_unused]] const std::source_location& loc) void Logger::DebugInternal(std::string_view fmt, std::format_args&& args, [[maybe_unused]] const std::source_location& loc)
{ {
const auto msg = std::vformat(fmt, args);
#ifdef LOGGER_TRACE #ifdef LOGGER_TRACE
const auto msg = std::vformat(fmt, args);
const auto out = std::format("Debug:\n {}\nFile: {}\nLine: {}\n", msg, loc.file_name(), loc.line()); const auto out = std::format("Debug:\n {}\nFile: {}\nLine: {}\n", msg, loc.file_name(), loc.line());
#else #else
const auto out = std::format("Debug:\n {}\n", msg); const auto out = "^2" + std::vformat(fmt, args);
#endif #endif
Logger::MessagePrint(Game::CON_CHANNEL_DONT_FILTER, out); Logger::MessagePrint(Game::CON_CHANNEL_DONT_FILTER, out);