Make --perf-syntax also change short message

refs #5418
This commit is contained in:
Jean Flach 2017-11-08 16:53:01 +01:00
parent f4a1747e14
commit d1d1c2e2e8
1 changed files with 6 additions and 6 deletions

View File

@ -372,19 +372,19 @@ INT PrintOutput(CONST po::variables_map& vm, printInfoStruct& pi)
wssPerfData << pi.dValue << ';' << pi.tWarn.pString() << ';' << pi.tCrit.pString() << ";;"; wssPerfData << pi.dValue << ';' << pi.tWarn.pString() << ';' << pi.tCrit.pString() << ";;";
if (pi.tCrit.rend(pi.dValue)) { if (pi.tCrit.rend(pi.dValue)) {
std::wcout << "PERFMON CRITICAL \"" << pi.wsFullPath << "\" = " std::wcout << "PERFMON CRITICAL \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
<< pi.dValue << " | " << wssPerfData.str() << '\n'; << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
return 2; return 2;
} }
if (pi.tWarn.rend(pi.dValue)) { if (pi.tWarn.rend(pi.dValue)) {
std::wcout << "PERFMON WARNING \"" << pi.wsFullPath << "\" = " std::wcout << "PERFMON WARNING \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
<< pi.dValue << " | " << wssPerfData.str() << '\n'; << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
return 1; return 1;
} }
std::wcout << "PERFMON OK \"" << pi.wsFullPath << "\" = " std::wcout << "PERFMON OK \"" << (vm.count("perf-syntax") ? vm["perf-syntax"].as<std::wstring>() : pi.wsFullPath)
<< pi.dValue << " | " << wssPerfData.str() << '\n'; << "\" = " << pi.dValue << " | " << wssPerfData.str() << '\n';
return 0; return 0;
} }