From 7ab2ded3a4d971a65dc0e3a137810c6124c72009 Mon Sep 17 00:00:00 2001
From: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
Date: Fri, 28 Apr 2017 14:07:12 -0400
Subject: [PATCH] registered name: don't log lookup success

Only log registered name lookup failures, to reduce log spam.

Change-Id: I4fa65294942a082177587841c91ed89f12acff18
Reviewed-by: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
---
 src/namedirectory.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/namedirectory.cpp b/src/namedirectory.cpp
index fa848b23..8dffce69 100644
--- a/src/namedirectory.cpp
+++ b/src/namedirectory.cpp
@@ -62,7 +62,19 @@ void NameDirectoryPrivate::slotNameRegistrationEnded(const QString& accountId, i
 //Registered Name found
 void NameDirectoryPrivate::slotRegisteredNameFound(const QString& accountId, int status, const QString& address, const QString& name)
 {
-    qDebug() << "Registered Name found. Account:" << accountId << "status:" << status << "name:" << name;
+    switch (static_cast<NameDirectory::LookupStatus>(status)) {
+        case NameDirectory::LookupStatus::INVALID_NAME:
+            qDebug() << "lookup name is INVALID:" << name << accountId;
+            break;
+        case NameDirectory::LookupStatus::NOT_FOUND:
+            qDebug() << "lookup name NOT FOUND:" << name << accountId;
+            break;
+        case NameDirectory::LookupStatus::ERROR:
+            qDebug() << "lookup name ERROR:" << name << accountId;
+            break;
+        case NameDirectory::LookupStatus::SUCCESS:
+            break;
+    }
 
     Account* account = AccountModel::instance().getById(accountId.toLatin1());
 
-- 
GitLab