From a7604ef62f198ea61389231fb76608a30e29d98a Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Tue, 8 Aug 2017 00:30:55 -0400
Subject: [PATCH] ringdht: add some info into buddy precence debug

This information has help us to find that a disabled account
was used by client.

Change-Id: I7d377138e77d03df41058cf9c84b4c4f7b4eb4c4
---
 src/ringdht/ringaccount.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp
index 6c179267bc..30e4e1de53 100644
--- a/src/ringdht/ringaccount.cpp
+++ b/src/ringdht/ringaccount.cpp
@@ -2018,7 +2018,8 @@ void
 RingAccount::trackBuddyPresence(const std::string& buddy_id)
 {
     if (not dht_.isRunning()) {
-        RING_ERR("DHT node not running. Cannot track buddy %s", buddy_id.c_str());
+        RING_ERR("[Account %s] DHT node not running. Cannot track buddy %s",
+                 getAccountID().c_str(), buddy_id.c_str());
         return;
     }
     std::weak_ptr<RingAccount> weak_this = std::static_pointer_cast<RingAccount>(shared_from_this());
@@ -2029,7 +2030,7 @@ RingAccount::trackBuddyPresence(const std::string& buddy_id)
         buddyUri = parseRingUri(buddy_id);
     }
     catch (...) {
-        RING_ERR("Failed to track a buddy due to an invalid URI %s", buddy_id.c_str());
+        RING_ERR("[Account %s] Failed to track a buddy due to an invalid URI %s", getAccountID().c_str(), buddy_id.c_str());
         return;
     }
 
-- 
GitLab