OGS
TCLAPArguments.cpp
Go to the documentation of this file.
1
9
10#include "TCLAPArguments.h"
11
12#include <vector>
13
14namespace BaseLib
15{
16
17TCLAP::ValueArg<std::string> makeLogLevelArg()
18{
19 static std::vector<std::string> allowed_log_levels{"none", "error", "warn",
20 "info", "debug", "all"};
21 static auto* allowed_log_levels_vals =
22 new TCLAP::ValuesConstraint<std::string>(allowed_log_levels);
23
24 return TCLAP::ValueArg<std::string>(
25 "l", "log-level", "the verbosity of logging messages", false,
26#ifdef NDEBUG
27 "info",
28#else
29 "all",
30#endif
31 allowed_log_levels_vals);
32}
33
34} // namespace BaseLib
TCLAP::ValueArg< std::string > makeLogLevelArg()