diff --git a/src/utils/Log.cpp b/src/utils/Log.cpp index 9755aa61d03f7d274d1c9978b1c6e410ff1320ef..f4bc32e8b70637738b14c684603b71a036e74fb6 100644 --- a/src/utils/Log.cpp +++ b/src/utils/Log.cpp @@ -104,8 +104,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); @@ -121,6 +126,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; @@ -164,7 +172,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 >= getConsoleLevel()) { for (const auto& context : mContext) {