- .gitignore: +Logs

- Program.cs: Telemetry configuration
- Startup.cs: Request logging middleware
This commit is contained in:
2026-11-09 12:52:43 +03:30
parent 0bc45bd8b9
commit 98f6af7ce5
3 changed files with 13 additions and 1 deletions
+1
View File
@@ -1,6 +1,7 @@
#
bin/*
obj/*
Logs
#
Db/*
+5 -1
View File
@@ -1,4 +1,5 @@
using System.Text;
using xLoggingService.DI;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
@@ -19,10 +20,13 @@ namespace xAiMcpServer
{
//
var result = Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
logging.AddXTelemetryLogger())
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
})
.AddXTelemetry();
//
return result;
+7
View File
@@ -140,6 +140,13 @@ namespace xAiMcpServer
// Using Routing ...
app.UseRouting();
//
// Using Request Logging ...
if (!isDevelopmentEnvironment)
{
app.UseXRequestLogger();
}
//
// Use xIdentityService (Authentication) ...
app.UseXIdentityService();