diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-09-20 10:11:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-20 10:15:34 -0700 |
commit | d0fba482b7fe81da1b5fe91b535a2ae7417f5cbb (patch) | |
tree | 2226618995f3fe2a7bf43ff8470a8cdbcece6794 /checkcloudconnection.cpp | |
parent | 54ec332c2ff2e1c853a8b55b3aa55419b718e709 (diff) | |
download | subsurface-d0fba482b7fe81da1b5fe91b535a2ae7417f5cbb.tar.gz |
Cloud storage: in verbose mode give lots of progress information
If a user gets stuck accessing cloud storage it's often hard to figure out
which step is hanging which makes it much harder to narrow down the
problem. With this patch calling Subsurface with '-v' will give somewhat
finely grained progress information on stderr.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'checkcloudconnection.cpp')
-rw-r--r-- | checkcloudconnection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/checkcloudconnection.cpp b/checkcloudconnection.cpp index 32adc0383..ef37c6a55 100644 --- a/checkcloudconnection.cpp +++ b/checkcloudconnection.cpp @@ -40,6 +40,8 @@ bool CheckCloudConnection::checkServer() reply->readAll() == QByteArray(MILK)) { reply->deleteLater(); mgr->deleteLater(); + if (verbose > 1) + qWarning() << "Cloud storage: successfully checked connection to cloud server"; return true; } // qDebug() << "did not get expected response - server unreachable" << @@ -52,11 +54,15 @@ bool CheckCloudConnection::checkServer() } reply->deleteLater(); mgr->deleteLater(); + if (verbose) + qWarning() << "Cloud storage: unable to connect to cloud server"; return false; } // helper to be used from C code extern "C" bool canReachCloudServer() { + if (verbose) + qWarning() << "Cloud storage: checking connection to cloud server"; return CheckCloudConnection::checkServer(); } |