From 632ca944deb705174d528a4f1cd30f914fdc04de Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 3 Sep 2023 11:45:20 +0200 Subject: [PATCH] impr: Align log output better --- lib/libimhex/include/hex/helpers/logger.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libimhex/include/hex/helpers/logger.hpp b/lib/libimhex/include/hex/helpers/logger.hpp index bdf9edd00..b02bd20a3 100644 --- a/lib/libimhex/include/hex/helpers/logger.hpp +++ b/lib/libimhex/include/hex/helpers/logger.hpp @@ -45,6 +45,9 @@ namespace hex::log { fmt::print(dest, ts, "{0} ", level); fmt::print(dest, "[{0}] ", IMHEX_PROJECT_NAME); + + constexpr static auto ProjectNameLength = std::char_traits::length(IMHEX_PROJECT_NAME); + fmt::print("{}", std::string(ProjectNameLength > 10 ? 0 : 10 - ProjectNameLength, ' ')); } template