Compare commits

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