mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-19802 Included compiled modules in --version output
This commit is contained in:
parent
f07b870a56
commit
bb207cb438
@ -583,6 +583,7 @@ bool handlePreValidationMongodOptions(const moe::Environment& params,
|
||||
log() << mongodVersion() << endl;
|
||||
printGitVersion();
|
||||
printOpenSSLVersion();
|
||||
printCompiledModules();
|
||||
return false;
|
||||
}
|
||||
if (params.count("sysinfo") && params["sysinfo"].as<bool>() == true) {
|
||||
|
@ -73,6 +73,20 @@ namespace mongo {
|
||||
return modules_list;
|
||||
}
|
||||
|
||||
void printCompiledModules() {
|
||||
stringstream ss;
|
||||
ss << "modules: ";
|
||||
auto modules_list = compiledModules();
|
||||
if (modules_list.size() == 0) {
|
||||
ss << "none";
|
||||
} else {
|
||||
for (const auto& m: modules_list) {
|
||||
ss << m << " ";
|
||||
}
|
||||
}
|
||||
log() << ss.str();
|
||||
}
|
||||
|
||||
bool isSameMajorVersion(const char* version) {
|
||||
int major = -1, minor = -1;
|
||||
pcrecpp::RE ver_regex("^(\\d+)\\.(\\d+)\\.");
|
||||
|
@ -47,6 +47,7 @@ const char* gitVersion();
|
||||
const char* distName();
|
||||
void printGitVersion();
|
||||
std::vector<std::string> compiledModules();
|
||||
void printCompiledModules();
|
||||
|
||||
// Checks whether another version is the same major version as us
|
||||
bool isSameMajorVersion(const char* version);
|
||||
|
Loading…
Reference in New Issue
Block a user