This commit is contained in:
Robin Müller 2021-01-04 15:31:06 +01:00
parent cca5689a18
commit 3c041388d6

View File

@ -28,18 +28,21 @@ ServiceInterfaceBuffer::ServiceInterfaceBuffer(std::string setMessage,
}
#if FSFW_COLORED_OUTPUT == 1
if(setMessage.find("DEBUG")) {
if(setMessage.find("DEBUG") != std::string::npos) {
colorPrefix = fsfw::ANSI_COLOR_MAGENTA;
}
else if(setMessage.find("INFO")) {
else if(setMessage.find("INFO") != std::string::npos) {
colorPrefix = fsfw::ANSI_COLOR_GREEN;
}
else if(setMessage.find("WARNING")) {
else if(setMessage.find("WARNING") != std::string::npos) {
colorPrefix = fsfw::ANSI_COLOR_YELLOW;
}
else if(setMessage.find("ERROR")) {
else if(setMessage.find("ERROR") != std::string::npos) {
colorPrefix = fsfw::ANSI_COLOR_RED;
}
else {
colorPrefix = fsfw::ANSI_COLOR_RESET;
}
#ifdef WIN32
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);