Promote a few more logs to info/warning
authorJocelyn Turcotte <jturcotte@woboq.com>
Thu, 11 May 2017 13:36:47 +0000 (15:36 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Thu, 11 May 2017 15:22:59 +0000 (17:22 +0200)
src/gui/application.cpp
src/gui/lockwatcher.cpp
src/libsync/abstractnetworkjob.cpp
src/libsync/owncloudpropagator.cpp
src/libsync/propagateupload.cpp
src/libsync/propagateuploadv1.cpp
src/libsync/propagatorjobs.cpp
src/libsync/syncengine.cpp

index c9f8f173a4ccb0a6e899f8a88cb958c341bf4b95..04e8176344b5044f734b9dbe2b6a6f85f2dd349b 100644 (file)
@@ -364,7 +364,7 @@ void Application::setupLogging()
 
     Logger::instance()->enterNextLogFile();
 
-    qCDebug(lcApplication) << QString::fromLatin1( "################## %1 %2 (%3) %4 on %5").arg(_theme->appName())
+    qCInfo(lcApplication) << QString::fromLatin1( "################## %1 locale:[%2] ui_lang:[%3] version:[%4] os:[%5]").arg(_theme->appName())
                 .arg( QLocale::system().name() )
                 .arg(property("ui_lang").toString())
                 .arg(_theme->version())
index 55e6bcbba076bcfa140c0896a0f9347ae6384f8a..832edc9001a4761d4d410ee5916df2bcb5cad61e 100644 (file)
@@ -34,7 +34,7 @@ LockWatcher::LockWatcher(QObject* parent)
 
 void LockWatcher::addFile(const QString& path)
 {
-    qCDebug(lcLockWatcher) << "Watching for lock of" << path << "being released";
+    qCInfo(lcLockWatcher) << "Watching for lock of" << path << "being released";
     _watchedPaths.insert(path);
 }
 
@@ -44,7 +44,7 @@ void LockWatcher::checkFiles()
 
     foreach (const QString& path, _watchedPaths) {
         if (!FileSystem::isFileLocked(path)) {
-            qCDebug(lcLockWatcher) << "Lock of" << path << "was released";
+            qCInfo(lcLockWatcher) << "Lock of" << path << "was released";
             emit fileUnlocked(path);
             unlocked.insert(path);
         }
index c62a3ae37a73ff57e04e3e945e18eaf26987c59f..5f6d7aa823045940a90622eecdfb622f6b40ff1f 100644 (file)
@@ -266,7 +266,7 @@ void AbstractNetworkJob::start()
 void AbstractNetworkJob::slotTimeout()
 {
     _timedout = true;
-    qCDebug(lcNetworkJob) << this << "Timeout" << (reply() ? reply()->request().url() : path());
+    qCWarning(lcNetworkJob) << "Network job timeout" << (reply() ? reply()->request().url() : path());
     onTimedOut();
 }
 
index dc5d9fe1bec3343aa7447ed70dc99f5d10b33a0c..2f18e45c587416a44d15fceebd4b90b4cd50b655 100644 (file)
@@ -264,7 +264,10 @@ void PropagateItemJob::done(SyncFileItem::Status statusArg, const QString &error
         break;
     }
 
-    qCInfo(lcPropagator) << "Completed propagation of" << _item->destination() << "by" << this << "with status" << _item->_status << "and error:" << _item->_errorString;
+    if (_item->hasErrorStatus())
+        qCWarning(lcPropagator) << "Could not complete propagation of" << _item->destination() << "by" << this << "with status" << _item->_status << "and error:" << _item->_errorString;
+    else
+        qCInfo(lcPropagator) << "Completed propagation of" << _item->destination() << "by" << this << "with status" << _item->_status;
     emit propagator()->itemCompleted(_item);
     emit finished(_item->_status);
 
index 8988f9a3b356d5bd6361bf4f82963024f65ee766..5467d1aa52e4dcc4d92879fde1dfb4365419e2b4 100644 (file)
@@ -523,7 +523,6 @@ void PropagateUploadFileCommon::abort()
 {
     foreach(auto *job, _jobs) {
         if (job->reply()) {
-            qCDebug(lcPropagateUpload) << job << this->_item->_file;
             job->reply()->abort();
         }
     }
index 6a266f3acf40bd49af153d61187a9bf007ba52ee..10f6a4fb2abdffb41d14a9eddbdb4480883695f7 100644 (file)
@@ -46,7 +46,7 @@ void PropagateUploadFileV1::doStartUpload()
     if (progressInfo._valid && Utility::qDateTimeToTime_t(progressInfo._modtime) == _item->_modtime ) {
         _startChunk = progressInfo._chunk;
         _transferId = progressInfo._transferid;
-        qCDebug(lcPropagateUpload) << _item->_file << ": Resuming from chunk " << _startChunk;
+        qCInfo(lcPropagateUpload) << _item->_file << ": Resuming from chunk " << _startChunk;
     }
 
     _currentChunk = 0;
index 94bab37b1281b16b667402858750c7ff38d1bcd1..c2e08d5a3ee25275dfa2bc63d07dc9611703813a 100644 (file)
@@ -162,7 +162,7 @@ void PropagateLocalMkdir::start()
     }
 
     if( Utility::fsCasePreserving() && propagator()->localFileNameClash(_item->_file ) ) {
-        qCDebug(lcPropagateLocalMkdir) << "WARN: new folder to create locally already exists!";
+        qCWarning(lcPropagateLocalMkdir) << "New folder to create locally already exists with different case:" << _item->_file;
         done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
         return;
     }
index 9c197c8eb7f8419666a2f893c9bc79d0a4fdded0..9673d7a4cda780467baea6319152f4bf81133379 100644 (file)
@@ -1464,9 +1464,12 @@ AccountPtr SyncEngine::account() const
 
 void SyncEngine::abort()
 {
+    if (_propagator)
+        qCInfo(lcEngine) << "Aborting sync";
+
     // Sets a flag for the update phase
     csync_request_abort(_csync_ctx);
-    qCDebug(lcEngine) << "Aborting sync, _discoveryMainThread:" << _discoveryMainThread;
+
     // Aborts the discovery phase job
     if (_discoveryMainThread) {
         _discoveryMainThread->abort();