mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-19 22:25:03 +02:00
better log messages, less noise on temporary timeouts (#275)
* better log messages, less noise on temporary timeouts
This commit is contained in:
parent
0562c52492
commit
06aa42f6d1
12
src/main.d
12
src/main.d
|
@ -350,7 +350,7 @@ int main(string[] args)
|
||||||
try {
|
try {
|
||||||
sync.scanForDifferences(path);
|
sync.scanForDifferences(path);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.logAndNotify(e.msg);
|
log.logAndNotify("Cannot create remote directory: ", e.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
m.onFileChanged = delegate(string path) {
|
m.onFileChanged = delegate(string path) {
|
||||||
|
@ -358,7 +358,7 @@ int main(string[] args)
|
||||||
try {
|
try {
|
||||||
sync.scanForDifferences(path);
|
sync.scanForDifferences(path);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.logAndNotify(e.msg);
|
log.logAndNotify("Cannot upload file changes/creation: ", e.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
m.onDelete = delegate(string path) {
|
m.onDelete = delegate(string path) {
|
||||||
|
@ -369,10 +369,10 @@ int main(string[] args)
|
||||||
if (e.msg == "The item to delete is not in the local database") {
|
if (e.msg == "The item to delete is not in the local database") {
|
||||||
log.vlog("Item cannot be deleted because not found in database");
|
log.vlog("Item cannot be deleted because not found in database");
|
||||||
} else {
|
} else {
|
||||||
log.logAndNotify(e.msg);
|
log.logAndNotify("Cannot delete remote item: ", e.msg);
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.logAndNotify(e.msg);
|
log.logAndNotify("Cannot delete remote item: ", e.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
m.onMove = delegate(string from, string to) {
|
m.onMove = delegate(string from, string to) {
|
||||||
|
@ -380,7 +380,7 @@ int main(string[] args)
|
||||||
try {
|
try {
|
||||||
sync.uploadMoveItem(from, to);
|
sync.uploadMoveItem(from, to);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.logAndNotify(e.msg);
|
log.logAndNotify("Cannot move item:, ", e.msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// initialise the monitor class
|
// initialise the monitor class
|
||||||
|
@ -515,7 +515,7 @@ void performSync(SyncEngine sync, string singleDirectory, bool downloadOnly, boo
|
||||||
count = -1;
|
count = -1;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (++count == 3) throw e;
|
if (++count == 3) throw e;
|
||||||
else log.logAndNotify(e.msg);
|
else log.log("Retrial sync count: ", count, ": ", e.msg);
|
||||||
}
|
}
|
||||||
} while (count != -1);
|
} while (count != -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue