diff --git a/Startup.cs b/Startup.cs index 00accc8..a76f047 100644 --- a/Startup.cs +++ b/Startup.cs @@ -30,7 +30,6 @@ namespace xIds public void ConfigureServices(IServiceCollection services) { - services.AddXLoggingService(Configuration); // // Register Validation Provider and all XCommons Module Services ... services.AddXCommons(Configuration); @@ -40,6 +39,10 @@ namespace xIds services.AddXAppConfiguration(Configuration); var appConfiguration = services.GetRegisteredService(); + // + // Register Logging Service ... + services.AddXLoggingService(Configuration); + // // Register XDataService Configuration ... services.AddXDataServiceConfiguration(Configuration, ConnectionStringNames.IDENTITY_CONNECTION_NAME); diff --git a/appsettings.json b/appsettings.json index 1fe501d..6a407c2 100644 --- a/appsettings.json +++ b/appsettings.json @@ -393,45 +393,43 @@ } ] }, + "LoggingServiceConfiguration": { + "Enabled": true, + "MinimumLevel": "Information", + "Queue": { + "Enabled": true, + "Capacity": 10000, + "ShutdownTimeoutSeconds": 10 + }, + "File": { + "Enabled": true, + "Format": "Json", + "Directory": "./Logs", + "FileName": "xIds-.log", + "MinimumLevel": "Information", + "RetainedFileCountLimit": 30 + }, + "Database": { + "Enabled": false, + "TableName": "XLogs", + "AutoCreateTable": true, + "MinimumLevel": "Warning", + "Provider": "Microsoft.Data.Sqlite", + "ConnectionString": "Filename=./Db/XLogs.db" + }, + "Event": { + "Enabled": false, + "Sender": "xIds", + "MinimumLevel": "Error", + "Topic": "application-logs", + "Action": "ApplicationLogCreated" + } + }, "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" - }, - "XLogger": { - "Enabled": true, - "ApplicationName": "xIds", - "EnvironmentName": "Production", - "MinimumLevel": "Information", - "Queue": { - "Enabled": true, - "Capacity": 10000, - "ShutdownTimeoutSeconds": 10 - }, - "File": { - "Enabled": true, - "Directory": "./Logs", - "FileName": "xIds-.log", - "Format": "Json", - "MinimumLevel": "Information", - "RetainedFileCountLimit": 30 - }, - "Database": { - "Enabled": false, - "Provider": "Microsoft.Data.Sqlite", - "ConnectionString": "Filename=./Db/XLogs.db", - "TableName": "XLogs", - "AutoCreateTable": true, - "MinimumLevel": "Warning" - }, - "Event": { - "Enabled": false, - "Topic": "application-logs", - "Action": "ApplicationLogCreated", - "Sender": "xIds", - "MinimumLevel": "Error" - } } }, "AllowedHosts": "*"