Skip to content

Commit 68ff9a3

Browse files
committed
fix(log): Fixes a lambda
1 parent 8ff8a99 commit 68ff9a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/common/log/include/grape/log/default_sink.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace grape::log {
1515
/// Default log sink implementation. Just writes to standard error output
1616
inline void defaultSink(const Record& rec) {
1717
if (::isatty(STDERR_FILENO) != 0) { // color format the logs if going to terminal
18-
const auto color = [](Severity sev) -> std::string_view {
18+
const auto* const color = [](Severity sev) {
1919
switch (sev) {
2020
// clang-format off
2121
case Severity::Critical: return "\033[37;41m"; // white on red
@@ -26,6 +26,7 @@ inline void defaultSink(const Record& rec) {
2626
case Severity::Debug: return "";
2727
// clang-format on
2828
}
29+
return "";
2930
}(rec.severity);
3031
static constexpr auto RESET_COLOR = "\033[0m";
3132
std::println(stderr, "{}{}{}", color, defaultFormatter(rec), RESET_COLOR);

0 commit comments

Comments
 (0)