diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-05-09 15:24:11 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-05-11 18:22:59 +0300 |
commit | 4ad190a558c64aac846dc828438acdec5fe9c6ed (patch) | |
tree | 92879909a4036fd51f7ece53654a0474298409c6 /src/gui/folderwatcher_mac.cpp | |
parent | 3a193655b3bdb9634c753e9e7b73a56469249655 (diff) |
Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.
Issue #5647
Diffstat (limited to 'src/gui/folderwatcher_mac.cpp')
-rw-r--r-- | src/gui/folderwatcher_mac.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/folderwatcher_mac.cpp b/src/gui/folderwatcher_mac.cpp index 6973536c8..d18ad8dba 100644 --- a/src/gui/folderwatcher_mac.cpp +++ b/src/gui/folderwatcher_mac.cpp @@ -19,7 +19,6 @@ #include <cerrno> -#include <QDebug> #include <QStringList> @@ -60,7 +59,7 @@ static void callback( | kFSEventStreamEventFlagItemModified; // for content change //We ignore other flags, e.g. for owner change, xattr change, Finder label change etc - qDebug() << "FolderWatcherPrivate::callback by OS X"; + qCDebug(lcFolderWatcher) << "FolderWatcherPrivate::callback by OS X"; QStringList paths; CFArrayRef eventPaths = (CFArrayRef)eventPathsVoid; @@ -74,7 +73,7 @@ static void callback( QString fn = qstring.normalized(QString::NormalizationForm_C); if (!(eventFlags[i] & c_interestingFlags)) { - qDebug() << "Ignoring non-content changes for" << fn; + qCDebug(lcFolderWatcher) << "Ignoring non-content changes for" << fn; continue; } @@ -86,7 +85,7 @@ static void callback( void FolderWatcherPrivate::startWatching() { - qDebug() << "FolderWatcherPrivate::startWatching()" << _folder; + qCDebug(lcFolderWatcher) << "FolderWatcherPrivate::startWatching()" << _folder; CFStringRef folderCF = CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar *>(_folder.unicode()), _folder.length()); CFArrayRef pathsToWatch = CFStringCreateArrayBySeparatingStrings (NULL, folderCF, CFSTR(":")); |