diff --git a/.gitignore b/.gitignore index 8490832..95a3056 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # bin/* obj/* +Logs # Db/* diff --git a/Program.cs b/Program.cs index f2b8c93..13cb52a 100644 --- a/Program.cs +++ b/Program.cs @@ -1,4 +1,5 @@ using System.Text; +using xLoggingService.DI; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; @@ -19,10 +20,13 @@ namespace xAiApi { // var result = Host.CreateDefaultBuilder(args) + .ConfigureLogging(logging => + logging.AddXTelemetryLogger()) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); - }); + }) + .AddXTelemetry(); // return result; diff --git a/Startup.cs b/Startup.cs index f28c614..f8a559e 100644 --- a/Startup.cs +++ b/Startup.cs @@ -271,6 +271,13 @@ namespace xAiApi // Using Routing ... app.UseRouting(); + // + // Using Request Logging ... + if (!isDevelopmentEnvironment) + { + app.UseXRequestLogger(); + } + // // Use xIdentityService (Authentication) ... app.UseXIdentityService(); diff --git a/xAiApi.csproj b/xAiApi.csproj index 27964e6..f51c8ce 100644 --- a/xAiApi.csproj +++ b/xAiApi.csproj @@ -1,4 +1,5 @@ + 1.0.0 @@ -7,22 +8,28 @@ SaherElm IT Center xSaherElm.xAiApi netcoreapp3.1 + a WebAPI Project which contains all Business Logic of xSaherElm Project's AI. + icon.png + - false false + false + + + @@ -33,8 +40,10 @@ + + @@ -58,12 +67,14 @@ + $(NoWarn);1591 true true + @@ -71,11 +82,10 @@ all + - - - + \ No newline at end of file