Skip to content

Commit

Permalink
metrics_provider: Use 'info' logging level for metrics issues
Browse files Browse the repository at this point in the history
This will keep messages from bubbling up to the client unless '-vv' or greater is used.

Fixes #486
  • Loading branch information
Chris Townsend committed Dec 7, 2018
1 parent cbe1bde commit 9ba657e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/metrics/metrics_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void post_request(const QUrl& metrics_url, const QByteArray& body)
if (reply->error() == QNetworkReply::ProtocolInvalidOperationError)
{
auto error_msg = QJsonDocument::fromJson(buff).object();
mpl::log(mpl::Level::error, category,
mpl::log(mpl::Level::info, category,
fmt::format("Metrics error: {} - {}", error_msg["code"].toString().toStdString(),
error_msg["message"].toString().toStdString()));
}
Expand Down Expand Up @@ -150,7 +150,7 @@ mp::MetricsProvider::MetricsProvider(const QUrl& url, const QString& unique_id,
}
catch (const std::exception& e)
{
mpl::log(mpl::Level::error, category, fmt::format("{} - Attempting to resend", e.what()));
mpl::log(mpl::Level::info, category, fmt::format("{} - Attempting to resend", e.what()));

metrics_failed = true;

Expand Down

0 comments on commit 9ba657e

Please sign in to comment.