diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-01-26 15:58:42 +0200 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-02-04 12:00:05 +0200 |
commit | cf48632f89383c9f96346ef8d0ac794f611766a0 (patch) | |
tree | 920d58db465e6f2b2d4f920244c9537312df3191 /src/libs/kdtools | |
parent | ca6dac1b663a7cefcb576692384d69ac0b85b0a5 (diff) |
Restructure logging utilities
Create a singleton-pattern class as an encapsulation unit for holding
and altering the state of debug printing attributes. Move related code
from various places under a single umbrella header file for logging
utilities, with some minor stylistic changes & cleanup.
This acts as a preparatory change for providing non-blocking headless
CLI runs when there is no TTY attached - that will be fixed in a
follow-up change.
Change-Id: Ib7f72cf75362c3ea6713058e92eda997d6df55c3
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/kdtools')
-rw-r--r-- | src/libs/kdtools/filedownloader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/kdtools/filedownloader.cpp b/src/libs/kdtools/filedownloader.cpp index ea8fdd23b..4cccfd9ca 100644 --- a/src/libs/kdtools/filedownloader.cpp +++ b/src/libs/kdtools/filedownloader.cpp @@ -32,6 +32,7 @@ #include "fileutils.h" #include "utils.h" +#include "loggingutils.h" #include <QDialog> #include <QDir> @@ -1401,7 +1402,8 @@ void KDUpdater::HttpDownloader::httpReqFinished() const QUrl url = d->http->url(); // Only print host information when the logging category is enabled // and output verbosity is set above standard level. - if (url.isValid() && QInstaller::lcServer().isDebugEnabled() && verboseLevel() == VerbosityLevel::Detailed) { + if (url.isValid() && QInstaller::lcServer().isDebugEnabled() + && LoggingHandler::instance().verboseLevel() == LoggingHandler::Detailed) { const QFileInfo fi(d->http->url().toString()); if (fi.suffix() != QLatin1String("sha1")){ const QString hostName = url.host(); |