If the message contains multiple lines, then preprocess it to output the content line by line.
| 73 | // If the message contains multiple lines, then preprocess it |
| 74 | // to output the content line by line. |
| 75 | void LogMessage(const char * messagePrefix, const std::string & message) |
| 76 | { |
| 77 | const StringUtils::StringVec parts |
| 78 | = StringUtils::SplitByLines(StringUtils::RightTrim(message)); |
| 79 | |
| 80 | for (const auto & part : parts) |
| 81 | { |
| 82 | std::string msg(messagePrefix); |
| 83 | msg += part; |
| 84 | msg += "\n"; |
| 85 | |
| 86 | g_loggingFunction(msg.c_str()); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | } |
| 91 |
no test coverage detected