This commit is contained in:
Robin Müller 2021-01-04 15:38:46 +01:00
parent 51cdf6cc76
commit e64b2e0616

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);