Skip to content

Commit

Permalink
Default log debug and set filter in main
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Aug 14, 2023
1 parent ccbf570 commit 07e8a72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/albert/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Q_DECLARE_LOGGING_CATEGORY(AlbertLoggingCategory)

/// @brief Defines the logging category used in DEBG, INFO, WARN, CRIT, GWARN, GCRIT
/// @param name The name of the logging category
#define ALBERT_LOGGING_CATEGORY(name) Q_LOGGING_CATEGORY(AlbertLoggingCategory, name, QtMsgType::QtInfoMsg)
#define ALBERT_LOGGING_CATEGORY(name) Q_LOGGING_CATEGORY(AlbertLoggingCategory, name, QtMsgType::QtDebugMsg)

/// @brief Creates a log object (level debug) you can use to pipe text into (<<).
#define DEBG qCDebug(AlbertLoggingCategory,).noquote()
Expand Down
1 change: 1 addition & 0 deletions src/albert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ int main(int argc, char **argv)
QLoggingCategory::setFilterRules("*.debug=false\n*.info=false");
} else if (parser.isSet(opt_d)){
printSystemReport();
QLoggingCategory::setFilterRules("");
} else
QLoggingCategory::setFilterRules("*.debug=false");

Expand Down

0 comments on commit 07e8a72

Please sign in to comment.