diff options
Diffstat (limited to 'daemon')
| -rw-r--r-- | daemon/daemon.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/daemon/daemon.cpp b/daemon/daemon.cpp index 69bcbe6..e4306da 100644 --- a/daemon/daemon.cpp +++ b/daemon/daemon.cpp @@ -52,9 +52,13 @@ int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); + QStringList filterRules; + + filterRules << (argc > 1 and QString("-d") == argv[0] ? + "*.debug=false" : "*.debug=true"); + // Init logging should be called after app object creation - QLoggingCategory::setFilterRules("*.debug=false\n" - "fc.io.debug=true"); + QLoggingCategory::setFilterRules(filterRules.join("\n")); QLoggingCategory l("main"); qCDebug(l) << argv[0] << APP_VERSION; |
