Merge pull request #347 from diamante0018/develop

[Logger] Make debug text less lengthy
This commit is contained in:
Edo 2022-07-02 11:50:54 +02:00 committed by GitHub
commit 7445daf03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);