mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
Move common package version code to init/common
This commit is contained in:
parent
5bed2ab42c
commit
615965cfd1
3 changed files with 14 additions and 8 deletions
|
@ -756,14 +756,7 @@ void InitParameterInteraction(ArgsManager& args)
|
||||||
void InitLogging(const ArgsManager& args)
|
void InitLogging(const ArgsManager& args)
|
||||||
{
|
{
|
||||||
init::SetLoggingOptions(args);
|
init::SetLoggingOptions(args);
|
||||||
|
init::LogPackageVersion();
|
||||||
std::string version_string = FormatFullVersion();
|
|
||||||
#ifdef DEBUG
|
|
||||||
version_string += " (debug build)";
|
|
||||||
#else
|
|
||||||
version_string += " (release build)";
|
|
||||||
#endif
|
|
||||||
LogPrintf(PACKAGE_NAME " version %s\n", version_string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace { // Variables internal to initialization process only
|
namespace { // Variables internal to initialization process only
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <config/bitcoin-config.h>
|
#include <config/bitcoin-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <clientversion.h>
|
||||||
#include <compat/sanity.h>
|
#include <compat/sanity.h>
|
||||||
#include <crypto/sha256.h>
|
#include <crypto/sha256.h>
|
||||||
#include <key.h>
|
#include <key.h>
|
||||||
|
@ -152,4 +153,15 @@ bool StartLogging(const ArgsManager& args)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LogPackageVersion()
|
||||||
|
{
|
||||||
|
std::string version_string = FormatFullVersion();
|
||||||
|
#ifdef DEBUG
|
||||||
|
version_string += " (debug build)";
|
||||||
|
#else
|
||||||
|
version_string += " (release build)";
|
||||||
|
#endif
|
||||||
|
LogPrintf(PACKAGE_NAME " version %s\n", version_string);
|
||||||
|
}
|
||||||
} // namespace init
|
} // namespace init
|
||||||
|
|
|
@ -22,6 +22,7 @@ void AddLoggingArgs(ArgsManager& args);
|
||||||
void SetLoggingOptions(const ArgsManager& args);
|
void SetLoggingOptions(const ArgsManager& args);
|
||||||
void SetLoggingCategories(const ArgsManager& args);
|
void SetLoggingCategories(const ArgsManager& args);
|
||||||
bool StartLogging(const ArgsManager& args);
|
bool StartLogging(const ArgsManager& args);
|
||||||
|
void LogPackageVersion();
|
||||||
} // namespace init
|
} // namespace init
|
||||||
|
|
||||||
#endif // BITCOIN_INIT_COMMON_H
|
#endif // BITCOIN_INIT_COMMON_H
|
||||||
|
|
Loading…
Reference in a new issue