Skip to content

Commit

Permalink
Logging: Filter all debug messages from the controller category
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Nov 16, 2021
1 parent ed7fb50 commit 03ebbf9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/util/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,8 @@ namespace mixxx {

namespace {

bool isControllerIoLoggingCategory(const QString& categoryName) {
return categoryName.startsWith("controller") &&
(categoryName.endsWith("input") ||
categoryName.endsWith("output"));
bool isControllerLoggingCategory(const QString& categoryName) {
return categoryName.startsWith("controller.");
}

// Debug message handler which outputs to stderr and a logfile,
Expand Down Expand Up @@ -281,7 +279,7 @@ void handleMessage(
// write debug messages into the log file, but skip controller I/O
// to avoid flooding the log file.
// Skip expensive string comparisons if WriteFlag::File is already set.
if (!writeFlags.testFlag(WriteFlag::File) && !isControllerIoLoggingCategory(categoryName)) {
if (!writeFlags.testFlag(WriteFlag::File) && !isControllerLoggingCategory(categoryName)) {
writeFlags |= WriteFlag::File;
}
break;
Expand Down

0 comments on commit 03ebbf9

Please sign in to comment.