Skip to content
Snippets Groups Projects
Unverified Commit 882ce449 authored by James Rowe's avatar James Rowe Committed by GitHub
Browse files

Merge pull request #1060 from lioncash/log

logging/backend: Use const reference to refer to log filter
parents 309564ab bc7bfd96
No related branches found
No related tags found
No related merge requests found
......@@ -302,13 +302,14 @@ Backend* GetBackend(std::string_view backend_name) {
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
unsigned int line_num, const char* function, const char* format,
const fmt::format_args& args) {
auto filter = Impl::Instance().GetGlobalFilter();
auto& instance = Impl::Instance();
const auto& filter = instance.GetGlobalFilter();
if (!filter.CheckMessage(log_class, log_level))
return;
Entry entry =
CreateEntry(log_class, log_level, filename, line_num, function, fmt::vformat(format, args));
Impl::Instance().PushEntry(std::move(entry));
instance.PushEntry(std::move(entry));
}
} // namespace Log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment