Mercurial > hg > svapp
changeset 705:beefce638f91
Send debug output to log
author | Chris Cannam |
---|---|
date | Fri, 16 Aug 2019 10:56:09 +0100 |
parents | 286bd8bb13cc |
children | 162c3f4b870c |
files | framework/VersionTester.cpp |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/VersionTester.cpp Thu Aug 15 18:18:46 2019 +0100 +++ b/framework/VersionTester.cpp Fri Aug 16 10:56:09 2019 +0100 @@ -34,7 +34,7 @@ m_nm(new QNetworkAccessManager) { QUrl url(QString("http://%1/%2").arg(hostname).arg(versionFilePath)); - cerr << "VersionTester: URL is " << url << endl; + SVCERR << "VersionTester: URL is " << url << endl; m_reply = m_nm->get(QNetworkRequest(url)); connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError))); @@ -82,7 +82,7 @@ void VersionTester::error(QNetworkReply::NetworkError) { - cerr << "VersionTester: error: " << m_reply->errorString() << endl; + SVCERR << "VersionTester: error: " << m_reply->errorString() << endl; m_httpFailed = true; } @@ -97,7 +97,7 @@ int status = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); if (status / 100 != 2) { - cerr << "VersionTester: error: http status = " << status << endl; + SVCERR << "VersionTester: error: http status = " << status << endl; return; } @@ -107,9 +107,9 @@ if (lines.empty()) return; QString latestVersion = lines[0]; - cerr << "Comparing current version \"" << m_myVersion << "\" with latest version \"" << latestVersion << "\"" << endl; + SVCERR << "Comparing current version \"" << m_myVersion << "\" with latest version \"" << latestVersion << "\"" << endl; if (isVersionNewerThan(latestVersion, m_myVersion)) { - cerr << "Latest version \"" << latestVersion << "\" is newer than current version \"" << m_myVersion << "\"" << endl; + SVCERR << "Latest version \"" << latestVersion << "\" is newer than current version \"" << m_myVersion << "\"" << endl; emit newerVersionAvailable(latestVersion); } }