Add Serilog console logging across the API

Information at endpoint and service-method boundaries, Debug in deeper
helpers, Warning before expected/recoverable failures (not-found,
validation, agent tool errors), Error on caught exceptions. Serilog
wraps the exception handler so request-completion logs report the
resolved status code rather than the raw exception. Never logs prose
bodies or the Anthropic API key.
This commit is contained in:
James Wampler
2026-08-06 12:11:20 -07:00
parent 4f396bb5f9
commit 04917fa09e
34 changed files with 790 additions and 147 deletions
+1 -2
View File
@@ -3,8 +3,7 @@ var builder = DistributedApplication.CreateBuilder(args);
// Port 5080 is pinned to match src/Novelly.Web's Vite proxy default and the curl-based
// smoke checks in CLAUDE.md, so the API sits at the same address whether it is started
// on its own with `dotnet run` or through this AppHost.
var api = builder.AddProject<Projects.Novelly_Api>("api")
.WithHttpEndpoint(port: 5080, name: "http");
var api = builder.AddProject<Projects.Novelly_Api>("api").WithHttpEndpoint(port: 5080, name: "http");
builder.AddViteApp("web", "../Novelly.Web", "dev")
.WithReference(api)