Promote a few more logs to info/warning

This commit is contained in:
Jocelyn Turcotte 2017-05-11 15:36:47 +02:00
parent b68d982619
commit 7fd2f292e7
8 changed files with 14 additions and 9 deletions

View 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())

View 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);
}

View 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();
}

View 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);

View File

@ -523,7 +523,6 @@ void PropagateUploadFileCommon::abort()
{
foreach(auto *job, _jobs) {
if (job->reply()) {
qCDebug(lcPropagateUpload) << job << this->_item->_file;
job->reply()->abort();
}
}

View 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;

View 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;
}

View 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();