add using XLoggingService ...

This commit is contained in:
2026-11-08 22:55:56 +03:30
parent b58f1dd736
commit c24c14eb74
2 changed files with 37 additions and 36 deletions
+5 -2
View File
@@ -1,4 +1,3 @@
using xLoggingService.DI;
using System; using System;
using System.IO; using System.IO;
using xAiApi.DI; using xAiApi.DI;
@@ -16,6 +15,7 @@ using Newtonsoft.Json;
using System.Reflection; using System.Reflection;
using xAiApi.Extensions; using xAiApi.Extensions;
using xStringService.DI; using xStringService.DI;
using xLoggingService.DI;
using xStorageService.DI; using xStorageService.DI;
using xIdentityService.DI; using xIdentityService.DI;
using xDataService.Models; using xDataService.Models;
@@ -62,7 +62,6 @@ namespace xAiApi
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddXLoggingService(Configuration);
// //
// Register Validation Provider and all XCommons Module Services ... // Register Validation Provider and all XCommons Module Services ...
services.AddXCommons(Configuration); services.AddXCommons(Configuration);
@@ -72,6 +71,10 @@ namespace xAiApi
services.AddXAppConfiguration(Configuration); services.AddXAppConfiguration(Configuration);
var appConfiguration = services.GetRegisteredService<XAppConfiguration>(); var appConfiguration = services.GetRegisteredService<XAppConfiguration>();
//
// Register Logging Service ...
services.AddXLoggingService(Configuration);
// //
// Register Allowed Origins ... // Register Allowed Origins ...
services.AddXCors(appConfiguration.AllowedOrigins); services.AddXCors(appConfiguration.AllowedOrigins);
+12 -14
View File
@@ -51,15 +51,8 @@
"BaseRoute": "hubs", "BaseRoute": "hubs",
"AddSupportMessageProtocol": true "AddSupportMessageProtocol": true
}, },
"Logging": { "LoggingServiceConfiguration": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
},
"XLogger": {
"Enabled": true, "Enabled": true,
"ApplicationName": "xAiApi",
"EnvironmentName": "Production",
"MinimumLevel": "Information", "MinimumLevel": "Information",
"Queue": { "Queue": {
"Enabled": true, "Enabled": true,
@@ -76,19 +69,24 @@
}, },
"Database": { "Database": {
"Enabled": false, "Enabled": false,
"Provider": "Microsoft.Data.Sqlite",
"ConnectionString": "Filename=./Db/XLogs.db",
"TableName": "XLogs", "TableName": "XLogs",
"AutoCreateTable": true, "AutoCreateTable": true,
"MinimumLevel": "Warning" "MinimumLevel": "Warning",
"Provider": "Microsoft.Data.Sqlite",
"ConnectionString": "Filename=./Db/XLogs.db"
}, },
"Event": { "Event": {
"Enabled": false, "Enabled": false,
"Topic": "application-logs",
"Action": "ApplicationLogCreated",
"Sender": "xAiApi", "Sender": "xAiApi",
"MinimumLevel": "Error" "MinimumLevel": "Error",
"Topic": "application-logs",
"Action": "ApplicationLogCreated"
} }
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"