diff --git a/daemon/lokinet.cpp b/daemon/lokinet.cpp index 7a20d2742..d8d59bf7c 100644 --- a/daemon/lokinet.cpp +++ b/daemon/lokinet.cpp @@ -34,12 +34,14 @@ SERVICE_STATUS_HANDLE SvcStatusHandle; bool start_as_daemon = false; #endif +static auto logcat = llarp::log::Cat("main"); std::shared_ptr ctx; std::promise exit_code; void handle_signal(int sig) { + llarp::log::info(logcat, "Handling signal {}", sig); if (ctx) ctx->loop->call([sig] { ctx->HandleSignal(sig); }); else @@ -647,7 +649,8 @@ SvcCtrlHandler(DWORD dwCtrl) switch (dwCtrl) { case SERVICE_CONTROL_STOP: - // tell servicve we are stopping + // tell service we are stopping + llarp::log::info(logcat, "Windows service controller gave SERVICE_CONTROL_STOP"); ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0); // do the actual tear down handle_signal(SIGINT); diff --git a/llarp/context.cpp b/llarp/context.cpp index e5b2074e2..9e818e589 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -20,6 +20,8 @@ #include #endif +static auto logcat = llarp::log::Cat("llarp-context"); + namespace llarp { bool @@ -159,6 +161,7 @@ namespace llarp void Context::HandleSignal(int sig) { + llarp::log::debug(logcat, "Handling signal {}", sig); if (sig == SIGINT || sig == SIGTERM) { SigINT(); @@ -188,6 +191,7 @@ namespace llarp { if (router) { + llarp::log::debug(logcat, "Handling SIGINT"); /// async stop router on sigint router->Stop(); }