Update Kestrel port and add console logging

This commit is contained in:
masoodafar-web
2025-12-06 22:24:18 +03:30
parent 4988950e6b
commit 52b0df4aa0

View File

@@ -14,13 +14,14 @@ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
builder.WebHost.ConfigureKestrel(options => builder.WebHost.ConfigureKestrel(options =>
{ {
// Setup a HTTP/2 endpoint without TLS. // Setup a HTTP/2 endpoint without TLS.
options.ListenLocalhost(5000, o => o.Protocols = options.ListenLocalhost(5001, o => o.Protocols =
HttpProtocols.Http2); HttpProtocols.Http2);
}); });
} }
var levelSwitch = new LoggingLevelSwitch(); var levelSwitch = new LoggingLevelSwitch();
var logger = new LoggerConfiguration() var logger = new LoggerConfiguration()
.WriteTo.Console()
.WriteTo.Seq(builder.Configuration["Seq:ServerUrl"] ?? "http://seq-svc:5341", .WriteTo.Seq(builder.Configuration["Seq:ServerUrl"] ?? "http://seq-svc:5341",
apiKey: string.IsNullOrEmpty(builder.Configuration["Seq:ApiKey"]) ? null : builder.Configuration["Seq:ApiKey"], apiKey: string.IsNullOrEmpty(builder.Configuration["Seq:ApiKey"]) ? null : builder.Configuration["Seq:ApiKey"],
controlLevelSwitch: levelSwitch) controlLevelSwitch: levelSwitch)