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

Method Main

lib/icinga/icingaapplication.cpp:103–118  ·  view source on GitHub ↗

* The entry point for the Icinga application. * * @returns An exit status. */

Source from the content-addressed store, hash-verified

101 * @returns An exit status.
102 */
103int IcingaApplication::Main()
104{
105 Log(LogDebug, "IcingaApplication", "In IcingaApplication::Main()");
106
107 /* periodically dump the program state */
108 l_RetentionTimer = Timer::Create();
109 l_RetentionTimer->SetInterval(300);
110 l_RetentionTimer->OnTimerExpired.connect([this](const Timer * const&) { DumpProgramState(); });
111 l_RetentionTimer->Start();
112
113 RunEventLoop();
114
115 Log(LogInformation, "IcingaApplication", "Icinga has shut down.");
116
117 return EXIT_SUCCESS;
118}
119
120void IcingaApplication::OnShutdown()
121{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
SetIntervalMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected