Skip to content
Bitcoin Roots

v29.4-roots.4 · Commit 2: [PATCH 02/37] runtime: preserve shared operator controls

src/init/common.cpp

Before: src/init/common.cpp · After: src/init/common.cpp

File metadata
index 362db9d40d05f20df11f2053e5071b1b2aca2b26..4494181f934a2a757606087287dd9c607be3af84 100644

Download original patch · Release notes

Diff rows 1–23 of 23. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/init/common.cpp CHANGED
@@ -40,7 +40,7 @@ void AddLoggingArgs(ArgsManager& argsman)
40
  argsman.AddArg("-loglevelalways", strprintf("Always prepend a category and level (default: %u)", DEFAULT_LOGLEVELALWAYS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
41
  argsman.AddArg("-logratelimit", strprintf("Apply rate limiting to unconditional logging to mitigate disk-filling attacks (default: %u)", BCLog::DEFAULT_LOGRATELIMIT), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
42
  argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
43
- argsman.AddArg("-shrinkdebugfile", "Shrink debug.log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
44
  }
45
 
46
  void SetLoggingOptions(const ArgsManager& args)
@@ -135,6 +135,15 @@ bool StartLogging(const ArgsManager& args)
135
  LogPrintf("Config file: %s (not found, skipping)\n", fs::PathToString(config_file_path));
136
  }
137
 
 
 
 
 
 
 
 
 
 
138
  // Log the config arguments to debug.log
139
  args.LogArgs();
140
 
 
40
  argsman.AddArg("-loglevelalways", strprintf("Always prepend a category and level (default: %u)", DEFAULT_LOGLEVELALWAYS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
41
  argsman.AddArg("-logratelimit", strprintf("Apply rate limiting to unconditional logging to mitigate disk-filling attacks (default: %u)", BCLog::DEFAULT_LOGRATELIMIT), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
42
  argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
43
+ argsman.AddArg("-shrinkdebugfile", "Shrink debug log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
44
  }
45
 
46
  void SetLoggingOptions(const ArgsManager& args)
 
135
  LogPrintf("Config file: %s (not found, skipping)\n", fs::PathToString(config_file_path));
136
  }
137
 
138
+ fs::path rwconfig_file_path = args.GetRWConfigFilePath();
139
+ if (fs::exists(rwconfig_file_path)) {
140
+ LogPrintf("R/W Config file: %s\n", fs::PathToString(rwconfig_file_path));
141
+ } else if (gArgs.IsArgSet("-confrw")) {
142
+ InitWarning(strprintf(_("The specified R/W config file %s does not exist"), fs::PathToString(rwconfig_file_path)));
143
+ } else {
144
+ LogPrintf("R/W Config file: %s (not found, skipping)\n", fs::PathToString(rwconfig_file_path));
145
+ }
146
+
147
  // Log the config arguments to debug.log
148
  args.LogArgs();
149