- .gitignore: +Logs
- Program.cs: Telemetry configuration - Startup.cs: Request logging middleware
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#
|
||||
bin/*
|
||||
obj/*
|
||||
Logs
|
||||
|
||||
#
|
||||
Db/*
|
||||
|
||||
+5
-1
@@ -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;
|
||||
|
||||
@@ -140,6 +140,13 @@ namespace xAiMcpServer
|
||||
// Using Routing ...
|
||||
app.UseRouting();
|
||||
|
||||
//
|
||||
// Using Request Logging ...
|
||||
if (!isDevelopmentEnvironment)
|
||||
{
|
||||
app.UseXRequestLogger();
|
||||
}
|
||||
|
||||
//
|
||||
// Use xIdentityService (Authentication) ...
|
||||
app.UseXIdentityService();
|
||||
|
||||
Reference in New Issue
Block a user