diff --git a/Program.cs b/Program.cs index a0c870f..4d24d3d 100644 --- a/Program.cs +++ b/Program.cs @@ -23,7 +23,6 @@ var builder = WebApplication.CreateBuilder(args); string mysqlConnectionString = ConnectionStringFactory.BuildMySqlFromEnv(); // ---- Services (before Build) ---- -builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddDbContext(options => @@ -65,6 +64,16 @@ builder.Services.AddHealthChecks() var app = builder.Build(); +// DEBUG: Log registered handlers +var router = app.Services.GetRequiredService(); +var handlers = app.Services.GetServices(); +foreach (var h in handlers) +{ + app.Logger.LogInformation("Registered handler: {Type} with opcodes: {OpCodes}", + h.GetType().Name, + string.Join(", ", h.SupportedOpCodes)); +} + // ---- Health endpoints ---- app.MapGet("/health/live", () => Results.Ok(new { status = "live" }));