MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetLogLevelCompletionSuggestions

Function GetLogLevelCompletionSuggestions

icinga-app/icinga.cpp:46–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#endif /* _WIN32 */
45
46static std::vector<String> GetLogLevelCompletionSuggestions(const String& arg)
47{
48 std::vector<String> result;
49
50 String debugLevel = "debug";
51 if (debugLevel.Find(arg) == 0)
52 result.push_back(debugLevel);
53
54 String noticeLevel = "notice";
55 if (noticeLevel.Find(arg) == 0)
56 result.push_back(noticeLevel);
57
58 String informationLevel = "information";
59 if (informationLevel.Find(arg) == 0)
60 result.push_back(informationLevel);
61
62 String warningLevel = "warning";
63 if (warningLevel.Find(arg) == 0)
64 result.push_back(warningLevel);
65
66 String criticalLevel = "critical";
67 if (criticalLevel.Find(arg) == 0)
68 result.push_back(criticalLevel);
69
70 return result;
71}
72
73static std::vector<String> GlobalArgumentCompletion(const String& argument, const String& word)
74{

Callers 1

GlobalArgumentCompletionFunction · 0.85

Calls 2

FindMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected