From 853e10e483fb4627e7316dcf6197b1461f853065 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 6 Nov 2023 19:59:20 -0300 Subject: [PATCH] Log UUID when -debug option is specified (fix #4104) In this way, in some cases, we could ask to the user for the -debug report and match some Sentry crash report with the user. --- src/app/check_update.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/check_update.cpp b/src/app/check_update.cpp index 8d4107581..6b900bdf9 100644 --- a/src/app/check_update.cpp +++ b/src/app/check_update.cpp @@ -121,10 +121,12 @@ void CheckUpdateThreadLauncher::launch() if (m_uuid.empty()) m_uuid = m_preferences.updater.uuid(); + if (!m_uuid.empty()) { #if ENABLE_SENTRY - if (!m_uuid.empty()) Sentry::setUserID(m_uuid); #endif + LOG(VERBOSE, "APP: Saved UUID %s\n", m_uuid.c_str()); + } // In this case we are in the "wait days" period, so we don't check // for updates. @@ -179,10 +181,12 @@ void CheckUpdateThreadLauncher::onMonitoringTick() m_uuid = m_response.getUuid(); m_preferences.updater.uuid(m_uuid); + if (!m_uuid.empty()) { #if ENABLE_SENTRY - if (!m_uuid.empty()) Sentry::setUserID(m_uuid); #endif + LOG(VERBOSE, "APP: New UUID %s\n", m_uuid.c_str()); + } } // Set the date of the last "check for updates" and the "WaitDays" parameter.