Skip to content

Commit

Permalink
exclude CSV loggers from logging error logs in signal handler when us…
Browse files Browse the repository at this point in the history
…ing CsvWriter
  • Loading branch information
odygrd committed Sep 24, 2024
1 parent ebb641d commit 0e9bac0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/quill/core/LoggerManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ class LoggerManager
// we can not add invalidated loggers as they can be removed at any time
if (elem->is_valid_logger())
{
if (elem->get_logger_name().find(exclude_logger_substr) == std::string::npos)
// Return the logger only if it does not match the exclude_logger_substr
if (exclude_logger_substr.empty() || elem->get_logger_name().find(exclude_logger_substr) == std::string::npos)
{
// Use this logger since it doesn't include the an excluded substring
// Return this logger if it's valid and not excluded
return elem.get();
}
}
Expand Down

0 comments on commit 0e9bac0

Please sign in to comment.