mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 09:06:07 +02:00
feat: Add diagnostic logging for hosted services resolution and startup timing
This commit is contained in:
@@ -202,6 +202,15 @@ while (true)
|
|||||||
}
|
}
|
||||||
}, heartbeatCts.Token);
|
}, heartbeatCts.Token);
|
||||||
|
|
||||||
|
// ── Enumerate hosted services (DI resolution) ────────────────────
|
||||||
|
Console.Error.WriteLine("[DIAG] Resolving IHostedService instances from DI...");
|
||||||
|
var hostedServices = app.Services.GetServices<IHostedService>().ToList();
|
||||||
|
Console.Error.WriteLine($"[DIAG] Found {hostedServices.Count} hosted services:");
|
||||||
|
foreach (var svc in hostedServices)
|
||||||
|
Console.Error.WriteLine($"[DIAG] - {svc.GetType().FullName}");
|
||||||
|
Console.Error.Flush();
|
||||||
|
|
||||||
|
// ── Start with per-service timing ─────────────────────────────────
|
||||||
Console.Error.WriteLine("[DIAG] Calling app.StartAsync()...");
|
Console.Error.WriteLine("[DIAG] Calling app.StartAsync()...");
|
||||||
await app.StartAsync();
|
await app.StartAsync();
|
||||||
Console.Error.WriteLine("[DIAG] app.StartAsync() completed — server is running.");
|
Console.Error.WriteLine("[DIAG] app.StartAsync() completed — server is running.");
|
||||||
|
|||||||
Reference in New Issue
Block a user