 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
5 #if defined(HAVE_CONFIG_H)
29 LogPrintf(
"Using the '%s' SHA256 implementation\n", sha256_algo);
64 argsman.
AddArg(
"-debug=<category>",
"Output debugging information (default: -nodebug, supplying <category> is optional). "
65 "If <category> is not supplied or if <category> = 1, output all debugging information. <category> can be: " +
LogInstance().LogCategoriesString() +
". This option can be specified multiple times to output multiple categories.",
67 argsman.
AddArg(
"-debugexclude=<category>",
"Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except the specified category. This option can be specified multiple times to exclude multiple categories.",
ArgsManager::ALLOW_ANY,
OptionsCategory::DEBUG_TEST);
70 #ifdef HAVE_THREAD_LOCAL
88 #ifdef HAVE_THREAD_LOCAL
100 const std::vector<std::string> categories =
args.
GetArgs(
"-debug");
102 if (std::none_of(categories.begin(), categories.end(),
103 [](std::string cat){return cat ==
"0" || cat ==
"none";})) {
104 for (
const auto& cat : categories) {
113 for (
const std::string& cat :
args.
GetArgs(
"-debugexclude")) {
161 version_string +=
" (debug build)";
163 version_string +=
" (release build)";
void LogArgs() const
Log the config file options and the command line arguments, useful for troubleshooting.
fs::path AbsPathForConfigVal(const fs::path &path, bool net_specific)
Most paths passed as configuration arguments are treated as relative to the datadir if they are not a...
static const bool DEFAULT_LOGTIMEMICROS
bool GetBoolArg(const std::string &strArg, bool fDefault) const
Return boolean argument or default value.
static bool exists(const path &p)
void AddHiddenArgs(const std::vector< std::string > &args)
Add many hidden arguments.
bilingual_str _(const char *psz)
Translation function.
bool SanityChecks()
Ensure a usable environment with all necessary library support.
void SetLoggingCategories(const ArgsManager &args)
static std::unique_ptr< ECCVerifyHandle > globalVerifyHandle
fs::path GetDefaultDataDir()
const fs::path & GetDataDirNet() const
Get data directory path with appended network identifier.
bool ChronoSanityCheck()
Sanity check epoch match normal Unix epoch.
@ ALLOW_ANY
disable validation
static const bool DEFAULT_LOGIPS
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
bool ECC_InitSanityCheck()
Check that required EC support is available at runtime.
int64_t GetTime()
DEPRECATED Use either GetTimeSeconds (not mockable) or GetTime<T> (mockable)
bool glibcxx_sanity_test()
static const bool DEFAULT_LOGTIMESTAMPS
static std::string PathToString(const path &path)
Convert path object to a byte string.
std::string FormatISO8601DateTime(int64_t nTime)
ISO 8601 formatting is preferred.
const char *const BITCOIN_CONF_FILENAME
std::string SHA256AutoDetect()
Autodetect the best available SHA256 implementation.
void SetLoggingOptions(const ArgsManager &args)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
void ECC_Stop()
Deinitialize the elliptic curve support.
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
bool InitError(const bilingual_str &str)
Show error message.
void AddArg(const std::string &name, const std::string &help, unsigned int flags, const OptionsCategory &cat)
Add argument.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
static const bool DEFAULT_LOGSOURCELOCATIONS
static path PathFromString(const std::string &string)
Convert byte string to path object.
void RandomInit()
Initialize global RNG state and log any CPU features that are used.
bool m_log_sourcelocations
static const bool DEFAULT_LOGTHREADNAMES
void InitWarning(const bilingual_str &str)
Show warning message.
void ECC_Start()
Initialize the elliptic curve support.
bool IsArgNegated(const std::string &strArg) const
Return true if the argument was originally passed as a negated option, i.e.
Users of this module must hold an ECCVerifyHandle.
fs::path GetConfigFile(const std::string &confPath)
bool StartLogging(const ArgsManager &args)
bool Random_SanityCheck()
Check that OS randomness is available and returning the requested number of bytes.
BCLog::Logger & LogInstance()
const char *const DEFAULT_DEBUGLOGFILE
std::vector< std::string > GetArgs(const std::string &strArg) const
Return a vector of strings of the given argument.
std::string FormatFullVersion()
void AddLoggingArgs(ArgsManager &argsman)