MCPcopy Create free account
hub / github.com/comaps/comaps / ValidateLogAbortLevel

Function ValidateLogAbortLevel

qt/main.cpp:55–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53namespace
54{
55bool ValidateLogAbortLevel(char const * flagname, std::string const & value)
56{
57 if (auto level = base::FromString(value); !level)
58 {
59 std::cerr << "Invalid value for --" << flagname << ": " << value << ", must be one of: ";
60 auto const & names = base::GetLogLevelNames();
61 for (size_t i = 0; i < names.size(); ++i)
62 {
63 if (i != 0)
64 std::cerr << ", ";
65 std::cerr << names[i];
66 }
67 std::cerr << '\n';
68 return false;
69 }
70 return true;
71}
72
73bool const g_logAbortLevelDummy = gflags::RegisterFlagValidator(&FLAGS_log_abort_level, &ValidateLogAbortLevel);
74

Callers

nothing calls this directly

Calls 2

FromStringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected