From c7028d3368e90fef2dd2a7ae68877767d602eff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Tue, 13 Jan 2026 12:01:41 +0100 Subject: [PATCH] init: log that additional logs may contain privacy-sensitive information Log an info message when any `-debug` categories are enabled, noting they may contain privacy-sensitive information (e.g. transaction IDs) and should not be shared publicly. Co-authored-by: Vasil Dimov Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> --- src/init/common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/init/common.cpp b/src/init/common.cpp index d1926d04940..5436cba59c2 100644 --- a/src/init/common.cpp +++ b/src/init/common.cpp @@ -98,6 +98,11 @@ util::Result SetLoggingCategories(const ArgsManager& args) return util::Error{strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)}; } } + + if (LogInstance().GetCategoryMask() != BCLog::NONE) { + LogInfo("Debug logging is enabled (-debug). Additional log output may contain privacy-sensitive information. Be cautious when sharing logs."); + } + return {}; }