From 9b552c463fefa548e43e79839548e44c280b74b6 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 10 Oct 2018 10:25:24 +0800 Subject: [PATCH] Add FileSystemWatcher log messages --- src/base/filesystemwatcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/filesystemwatcher.cpp b/src/base/filesystemwatcher.cpp index 9ce72bbb1..550a7f6a0 100644 --- a/src/base/filesystemwatcher.cpp +++ b/src/base/filesystemwatcher.cpp @@ -40,6 +40,7 @@ #include "base/bittorrent/magneturi.h" #include "base/bittorrent/torrentinfo.h" #include "base/global.h" +#include "base/logger.h" #include "base/preferences.h" #include "base/utils/fs.h" @@ -83,8 +84,7 @@ void FileSystemWatcher::addPath(const QString &path) // Check if the path points to a network file system or not if (Utils::Fs::isNetworkFileSystem(path)) { // Network mode - qDebug("Network folder detected: %s", qUtf8Printable(path)); - qDebug("Using file polling mode instead of inotify..."); + LogMsg(tr("Watching remote folder: \"%1\"").arg(Utils::Fs::toNativePath(path))); m_watchedFolders << dir; m_watchTimer.start(WATCH_INTERVAL); @@ -93,7 +93,7 @@ void FileSystemWatcher::addPath(const QString &path) #endif // Normal mode - qDebug("FS Watcher is watching %s in normal mode", qUtf8Printable(path)); + LogMsg(tr("Watching local folder: \"%1\"").arg(Utils::Fs::toNativePath(path))); QFileSystemWatcher::addPath(path); scanLocalFolder(path); }