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

Method StatsFunc

lib/compat/compatlogger.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27REGISTER_STATSFUNCTION(CompatLogger, &CompatLogger::StatsFunc);
28
29void CompatLogger::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
30{
31 DictionaryData nodes;
32
33 for (const CompatLogger::Ptr& compat_logger : ConfigType::GetObjectsByType<CompatLogger>()) {
34 nodes.emplace_back(compat_logger->GetName(), 1); // add more stats
35 }
36
37 status->Set("compatlogger", new Dictionary(std::move(nodes)));
38}
39
40void CompatLogger::OnAllConfigLoaded()
41{

Callers

nothing calls this directly

Calls 2

GetNameMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected