* The entry point for the Icinga application. * * @returns An exit status. */
| 101 | * @returns An exit status. |
| 102 | */ |
| 103 | int 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 | |
| 120 | void IcingaApplication::OnShutdown() |
| 121 | { |
nothing calls this directly
no test coverage detected