Remove namespaces in logs (#4283)

This commit is contained in:
Niram7777 2026-04-19 20:37:38 +02:00 committed by GitHub
parent 67edac4c9e
commit a95e71e156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -28,6 +28,7 @@ if (TARGET fmt::fmt)
set(SPDLOG_FMT_EXTERNAL ON)
endif()
add_subdirectory(spdlog EXCLUDE_FROM_ALL SYSTEM)
target_compile_definitions(spdlog PUBLIC SPDLOG_FUNCTION=__func__)
# fmtlib
if (NOT TARGET fmt::fmt)

View File

@ -44,9 +44,7 @@ struct thread_name_formatter : spdlog::formatter {
spdlog::details::fmt_helper::append_int(msg.source.line, dest);
dest.push_back(' ');
spdlog::details::fmt_helper::append_string_view(
std::string_view(msg.source.funcname).contains("(anonymous class)::operator()")
? "lambda"
: msg.source.funcname,
std::string_view(msg.source.funcname) == "operator()" ? "lambda" : msg.source.funcname,
dest);
dest.push_back(':');
dest.push_back(' ');