Skip to content

Commit c7028d3

Browse files
l0rincvasildMarcoFalke
committed
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 <vd@FreeBSD.org> Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
1 parent 31b771a commit c7028d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/init/common.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ util::Result<void> SetLoggingCategories(const ArgsManager& args)
9898
return util::Error{strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)};
9999
}
100100
}
101+
102+
if (LogInstance().GetCategoryMask() != BCLog::NONE) {
103+
LogInfo("Debug logging is enabled (-debug). Additional log output may contain privacy-sensitive information. Be cautious when sharing logs.");
104+
}
105+
101106
return {};
102107
}
103108

0 commit comments

Comments
 (0)