mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Debug: Attempt to make log more useful
This commit is contained in:
parent
6e3809528e
commit
634dad033f
@ -296,19 +296,19 @@ void Folder::prepareToSync()
|
||||
|
||||
void Folder::slotRunEtagJob()
|
||||
{
|
||||
qDebug() << "* Trying to check" << alias() << "for changes via ETag check. (time since last sync:" << (_timeSinceLastSyncDone.elapsed() / 1000) << "s)";
|
||||
qDebug() << "* Trying to check" << remoteUrl().toString() << "for changes via ETag check. (time since last sync:" << (_timeSinceLastSyncDone.elapsed() / 1000) << "s)";
|
||||
|
||||
Q_ASSERT(_accountState );
|
||||
|
||||
AccountPtr account = _accountState->account();
|
||||
|
||||
if (!_requestEtagJob.isNull()) {
|
||||
qDebug() << Q_FUNC_INFO << alias() << "has ETag job queued, not trying to sync";
|
||||
qDebug() << Q_FUNC_INFO << remoteUrl().toString() << "has ETag job queued, not trying to sync";
|
||||
return;
|
||||
}
|
||||
|
||||
if (_definition.paused || !_accountState->isConnected()) {
|
||||
qDebug() << "Not syncing. :" << alias() << _definition.paused << AccountState::stateString(_accountState->state());
|
||||
qDebug() << "Not syncing. :" << remoteUrl().toString() << _definition.paused << AccountState::stateString(_accountState->state());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -356,12 +356,13 @@ void Folder::slotRunEtagJob()
|
||||
|
||||
void Folder::etagRetreived(const QString& etag)
|
||||
{
|
||||
qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag;
|
||||
//qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag;
|
||||
|
||||
// re-enable sync if it was disabled because network was down
|
||||
FolderMan::instance()->setSyncEnabled(true);
|
||||
|
||||
if (_lastEtag != etag) {
|
||||
qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag << "-> CHANGED";
|
||||
_lastEtag = etag;
|
||||
emit scheduleToSync(this);
|
||||
}
|
||||
@ -882,7 +883,7 @@ void Folder::startSync(const QStringList &pathList)
|
||||
_syncResult.setSyncFileItemVector(SyncFileItemVector());
|
||||
emit syncStateChange();
|
||||
|
||||
qDebug() << "*** Start syncing " << alias() << " - client version"
|
||||
qDebug() << "*** Start syncing " << remoteUrl().toString() << " - client version"
|
||||
<< qPrintable(Theme::instance()->version());
|
||||
|
||||
if (! setIgnoredFiles())
|
||||
|
||||
@ -523,12 +523,12 @@ void FolderMan::slotEtagJobDestroyed(QObject* /*o*/)
|
||||
void FolderMan::slotRunOneEtagJob()
|
||||
{
|
||||
if (_currentEtagJob.isNull()) {
|
||||
QString alias;
|
||||
Folder *folder;
|
||||
foreach(Folder *f, _folderMap) {
|
||||
if (f->etagJob()) {
|
||||
// Caveat: always grabs the first folder with a job, but we think this is Ok for now and avoids us having a seperate queue.
|
||||
_currentEtagJob = f->etagJob();
|
||||
alias = f->alias();
|
||||
folder = f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -540,7 +540,7 @@ void FolderMan::slotRunOneEtagJob()
|
||||
restartApplication();
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Scheduling" << alias << "to check remote ETag";
|
||||
qDebug() << "Scheduling" << folder->remoteUrl().toString() << "to check remote ETag";
|
||||
_currentEtagJob->start(); // on destroy/end it will continue the queue via slotEtagJobDestroyed
|
||||
}
|
||||
}
|
||||
@ -657,7 +657,7 @@ void FolderMan::startScheduledSyncSoon(qint64 msMinimumDelay)
|
||||
void FolderMan::slotStartScheduledFolderSync()
|
||||
{
|
||||
if( _currentSyncFolder ) {
|
||||
qDebug() << "Currently folder " << _currentSyncFolder->alias() << " is running, wait for finish!";
|
||||
qDebug() << "Currently folder " << _currentSyncFolder->remoteUrl().toString() << " is running, wait for finish!";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -746,7 +746,7 @@ void FolderMan::slotForwardFolderSyncStateChange()
|
||||
|
||||
void FolderMan::slotFolderSyncStarted( )
|
||||
{
|
||||
qDebug() << ">===================================== sync started for " << _currentSyncFolder->alias();
|
||||
qDebug() << ">===================================== sync started for " << _currentSyncFolder->remoteUrl().toString();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -757,7 +757,7 @@ void FolderMan::slotFolderSyncStarted( )
|
||||
*/
|
||||
void FolderMan::slotFolderSyncFinished( const SyncResult& )
|
||||
{
|
||||
qDebug() << "<===================================== sync finished for " << _currentSyncFolder->alias();
|
||||
qDebug() << "<===================================== sync finished for " << _currentSyncFolder->remoteUrl().toString();
|
||||
|
||||
_lastSyncFolder = _currentSyncFolder;
|
||||
_currentSyncFolder = 0;
|
||||
|
||||
@ -199,7 +199,7 @@ void ownCloudGui::slotSyncStateChange( Folder* folder )
|
||||
|
||||
auto result = folder->syncResult();
|
||||
|
||||
qDebug() << "Sync state changed for folder " << folder->alias() << ": " << result.statusString();
|
||||
qDebug() << "Sync state changed for folder " << folder->remoteUrl().toString() << ": " << result.statusString();
|
||||
|
||||
if (result.status() == SyncResult::Success || result.status() == SyncResult::Error) {
|
||||
Logger::instance()->enterNextLogFile();
|
||||
|
||||
@ -76,7 +76,7 @@ void AbstractNetworkJob::setReply(QNetworkReply *reply)
|
||||
|
||||
void AbstractNetworkJob::setTimeout(qint64 msec)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << msec;
|
||||
//qDebug() << Q_FUNC_INFO << msec;
|
||||
|
||||
_timer.start(msec);
|
||||
}
|
||||
@ -225,7 +225,8 @@ void AbstractNetworkJob::start()
|
||||
const QUrl url = account()->url();
|
||||
const QString displayUrl = QString( "%1://%2%3").arg(url.scheme()).arg(url.host()).arg(url.path());
|
||||
|
||||
qDebug() << "!!!" << metaObject()->className() << "created for" << displayUrl << "+" << path();
|
||||
QString parentMetaObjectName = parent() ? parent()->metaObject()->className() : "";
|
||||
qDebug() << "!!!" << metaObject()->className() << "created for" << displayUrl << "+" << path() << parentMetaObjectName;
|
||||
}
|
||||
|
||||
void AbstractNetworkJob::slotTimeout()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user