mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 1d1f8bbf57 into merged_master (Bitcoin PR #16115)
This commit is contained in:
commit
6f123becd3
6 changed files with 114 additions and 7 deletions
|
|
@ -903,6 +903,32 @@ std::vector<util::SettingsValue> ArgsManager::GetSettingsList(const std::string&
|
|||
return util::GetSettingsList(m_settings, m_network, SettingName(arg), !UseDefaultSection(arg));
|
||||
}
|
||||
|
||||
void ArgsManager::logArgsPrefix(
|
||||
const std::string& prefix,
|
||||
const std::string& section,
|
||||
const std::map<std::string, std::vector<util::SettingsValue>>& args) const
|
||||
{
|
||||
std::string section_str = section.empty() ? "" : "[" + section + "] ";
|
||||
for (const auto& arg : args) {
|
||||
for (const auto& value : arg.second) {
|
||||
Optional<unsigned int> flags = GetArgFlags('-' + arg.first);
|
||||
if (flags) {
|
||||
std::string value_str = (*flags & SENSITIVE) ? "****" : value.write();
|
||||
LogPrintf("%s %s%s=%s\n", prefix, section_str, arg.first, value_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ArgsManager::LogArgs() const
|
||||
{
|
||||
LOCK(cs_args);
|
||||
for (const auto& section : m_settings.ro_config) {
|
||||
logArgsPrefix("Config file arg:", section.first, section.second);
|
||||
}
|
||||
logArgsPrefix("Command-line arg:", "", m_settings.command_line_options);
|
||||
}
|
||||
|
||||
bool RenameOver(fs::path src, fs::path dest)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue