Skip to content

Commit 61e2707

Browse files
committed
Fix colors
1 parent 97a8cfb commit 61e2707

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/dsm/headers/Dynamics.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,8 @@ namespace dsm {
112112
path.insert(nodeId, nextNodeId, true);
113113
}
114114
} else if ((nextNodeId != destinationID)) {
115-
std::cerr << std::format(
116-
"\033[38;2;130;30;180mWARNING ({}:{}): No "
117-
"path found "
118-
"from node {} "
119-
"to node {}\033[0m",
120-
__FILE__,
121-
__LINE__,
122-
nextNodeId,
123-
destinationID)
124-
<< std::endl;
115+
logger.warning(std::format(
116+
"No path found from node {} to node {}", nextNodeId, destinationID));
125117
}
126118
}
127119
}

src/dsm/utility/Logger.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ namespace dsm {
3030
inline void info(
3131
const std::string& message,
3232
const std::source_location& location = std::source_location::current()) {
33-
std::clog << buildMessage("\033[38;2;0;0;255mINFO ", message, location) +
34-
"\033[0m\n";
33+
std::clog << buildMessage("\033[1;32mINFO ", message, location) + "\033[1;0m\n";
3534
};
3635
inline void debug(
3736
const std::string& message,
@@ -45,12 +44,12 @@ namespace dsm {
4544
const std::string& message,
4645
const std::source_location& location = std::source_location::current()) {
4746
std::clog << buildMessage("\033[38;2;130;30;180mWARNING ", message, location) +
48-
"\033[0m\n";
47+
"\033[1;0m\n";
4948
};
5049
inline void error(
5150
const std::string& message,
5251
const std::source_location& location = std::source_location::current()) {
53-
std::cerr << buildMessage("\033[38;5;196mERROR ", message, location) + "\033[0m\n";
52+
std::cerr << buildMessage("\033[1;31mERROR ", message, location) + "\033[1;0m\n";
5453
std::abort();
5554
}
5655
};

0 commit comments

Comments
 (0)