diff --git a/src/utils/Log.cpp b/src/utils/Log.cpp index b4c64d527d361db31e46c6b6dbe6d3b4ebf6765b..5952cedec40f891c757f47d3ff5587a1fe8e523d 100644 --- a/src/utils/Log.cpp +++ b/src/utils/Log.cpp @@ -102,8 +102,13 @@ void Log::log(Level level, const std::string& msg) { while (start < text.size()) { std::size_t lineWidth = 0; std::size_t current = start; - - while (current < text.size() && lineWidth < width) { + bool inPath = false; + while (current < text.size() && (lineWidth < width || inPath)) { + if (inPath){ + if (text[current] == ' ' || text[current] == '\n'){ + inPath = false; + } + } if (text[current] == '\033') { // Found ANSI escape sequence, skip until 'm' std::size_t ansiEnd = text.find('m', current); @@ -119,6 +124,9 @@ void Log::log(Level level, const std::string& msg) { // Handle explicit line break break; } else { + if(!inPath && (text[current] == '/' || text[current] == '\\')) { + inPath = true; + } // Normal character, increase line width ++lineWidth; ++current; @@ -162,7 +170,7 @@ void Log::log(Level level, const std::string& msg) { // Get the string representation of the log level const auto levelStr = EnumStrings<Level>::data[static_cast<std::size_t>(level)]; const std::size_t levelIndentSizes[6] = {10, 9, 11, 12, 10, 10}; - const std::size_t width = 80 - levelIndentSizes[static_cast<std::size_t>(level)]; + const std::size_t width = 100 - levelIndentSizes[static_cast<std::size_t>(level)]; if (level >= mConsoleLevel) { for (const auto& context : mContext) {