Compare commits

..
1 Commits
Author SHA1 Message Date
saherelm b311b1e391 add using XLoggingService ... 2026-11-08 22:55:19 +03:30
2 changed files with 36 additions and 35 deletions
+4 -1
View File
@@ -30,7 +30,6 @@ namespace xIds
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);
@@ -40,6 +39,10 @@ namespace xIds
services.AddXAppConfiguration(Configuration); services.AddXAppConfiguration(Configuration);
var appConfiguration = services.GetRegisteredService<XAppConfiguration>(); var appConfiguration = services.GetRegisteredService<XAppConfiguration>();
//
// Register Logging Service ...
services.AddXLoggingService(Configuration);
// //
// Register XDataService Configuration ... // Register XDataService Configuration ...
services.AddXDataServiceConfiguration(Configuration, ConnectionStringNames.IDENTITY_CONNECTION_NAME); services.AddXDataServiceConfiguration(Configuration, ConnectionStringNames.IDENTITY_CONNECTION_NAME);
+14 -16
View File
@@ -393,16 +393,8 @@
} }
] ]
}, },
"Logging": { "LoggingServiceConfiguration": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"XLogger": {
"Enabled": true, "Enabled": true,
"ApplicationName": "xIds",
"EnvironmentName": "Production",
"MinimumLevel": "Information", "MinimumLevel": "Information",
"Queue": { "Queue": {
"Enabled": true, "Enabled": true,
@@ -411,27 +403,33 @@
}, },
"File": { "File": {
"Enabled": true, "Enabled": true,
"Format": "Json",
"Directory": "./Logs", "Directory": "./Logs",
"FileName": "xIds-.log", "FileName": "xIds-.log",
"Format": "Json",
"MinimumLevel": "Information", "MinimumLevel": "Information",
"RetainedFileCountLimit": 30 "RetainedFileCountLimit": 30
}, },
"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": "xIds", "Sender": "xIds",
"MinimumLevel": "Error" "MinimumLevel": "Error",
"Topic": "application-logs",
"Action": "ApplicationLogCreated"
} }
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"