Update when 'Sync with OneDrive is ..' is outputted when in --monitor mode (#999)

* The original intention here was that 'Sync with OneDrive is ...' is outputted when the sync starts / ends in 'verbose' mode, and not added to when not using any 'verbose'. What is occurring is, this is being added when MONITOR_LOG_QUIET threshold is met, which was not the intention. This now fixes when this message is outputted so that it is more reflective of when a sync is being done, when in --monitor mode
This commit is contained in:
abraunegg 2020-07-22 15:56:20 +10:00 committed by GitHub
parent beb737e903
commit 76ce1036a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1029,7 +1029,7 @@ int main(string[] args)
}
try {
// perform a --monitor sync
if (logMonitorCounter == logInterval) log.log("Starting a sync with OneDrive");
if ((cfg.getValueLong("verbose") > 0) || (logMonitorCounter == logInterval)) log.log("Starting a sync with OneDrive");
performSync(sync, cfg.getValueString("single_directory"), cfg.getValueBool("download_only"), cfg.getValueBool("local_first"), cfg.getValueBool("upload_only"), (logMonitorCounter == logInterval ? MONITOR_LOG_QUIET : MONITOR_LOG_SILENT), fullScanRequired, syncListConfiguredFullScanOverride, displaySyncOptions, cfg.getValueBool("monitor"), m);
if (!cfg.getValueBool("download_only")) {
// discard all events that may have been generated by the sync that have not already been handled
@ -1040,7 +1040,7 @@ int main(string[] args)
log.error("ERROR: The following inotify error was generated: ", e.msg);
}
}
if (logMonitorCounter == logInterval) log.log("Sync with OneDrive is complete");
if ((cfg.getValueLong("verbose") > 0) || (logMonitorCounter == logInterval)) log.log("Sync with OneDrive is complete");
} catch (CurlException e) {
// we already tried three times in the performSync routine
// if we still have problems, then the sync handle might have