add using XLoggingService ...
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#
|
#
|
||||||
bin
|
bin
|
||||||
obj
|
obj
|
||||||
|
Logs
|
||||||
|
|
||||||
#
|
#
|
||||||
Db/*
|
Db/*
|
||||||
|
|||||||
+5
-2
@@ -42,7 +42,6 @@ namespace xApi
|
|||||||
|
|
||||||
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);
|
||||||
@@ -52,6 +51,10 @@ namespace xApi
|
|||||||
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);
|
||||||
@@ -122,7 +125,7 @@ namespace xApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(
|
public void Configure(
|
||||||
IApplicationBuilder app,
|
IApplicationBuilder app,
|
||||||
IWebHostEnvironment env
|
IWebHostEnvironment env
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
+33
-38
@@ -4,10 +4,7 @@
|
|||||||
"DefaultLanguage": "fa-IR",
|
"DefaultLanguage": "fa-IR",
|
||||||
"XPoweredValue": "SaherElmITCenter",
|
"XPoweredValue": "SaherElmITCenter",
|
||||||
"WelcomeMessage": "Welcome to xSaherElm Project's API",
|
"WelcomeMessage": "Welcome to xSaherElm Project's API",
|
||||||
"AllowedOrigins": [
|
"AllowedOrigins": ["http://saherelm.ir", "https://saherelm.ir"],
|
||||||
"http://saherelm.ir",
|
|
||||||
"https://saherelm.ir"
|
|
||||||
],
|
|
||||||
"SwaggerConfiguration": {
|
"SwaggerConfiguration": {
|
||||||
"Version": "v1.0",
|
"Version": "v1.0",
|
||||||
"Title": "xSaherElm API",
|
"Title": "xSaherElm API",
|
||||||
@@ -180,45 +177,43 @@
|
|||||||
"XPoweredValue": "SaherElmITCenter",
|
"XPoweredValue": "SaherElmITCenter",
|
||||||
"DefaultClientTimeout": -1
|
"DefaultClientTimeout": -1
|
||||||
},
|
},
|
||||||
|
"LoggingServiceConfiguration": {
|
||||||
|
"Enabled": true,
|
||||||
|
"MinimumLevel": "Information",
|
||||||
|
"Queue": {
|
||||||
|
"Enabled": true,
|
||||||
|
"Capacity": 10000,
|
||||||
|
"ShutdownTimeoutSeconds": 10
|
||||||
|
},
|
||||||
|
"File": {
|
||||||
|
"Enabled": true,
|
||||||
|
"Format": "Json",
|
||||||
|
"Directory": "./Logs",
|
||||||
|
"FileName": "xApi-.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": "xApi",
|
||||||
|
"MinimumLevel": "Error",
|
||||||
|
"Topic": "application-logs",
|
||||||
|
"Action": "ApplicationLogCreated"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
},
|
|
||||||
"XLogger": {
|
|
||||||
"Enabled": true,
|
|
||||||
"ApplicationName": "xApi",
|
|
||||||
"EnvironmentName": "Production",
|
|
||||||
"MinimumLevel": "Information",
|
|
||||||
"Queue": {
|
|
||||||
"Enabled": true,
|
|
||||||
"Capacity": 10000,
|
|
||||||
"ShutdownTimeoutSeconds": 10
|
|
||||||
},
|
|
||||||
"File": {
|
|
||||||
"Enabled": true,
|
|
||||||
"Directory": "./Logs",
|
|
||||||
"FileName": "xApi-.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": "xApi",
|
|
||||||
"MinimumLevel": "Error"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
|
|||||||
Reference in New Issue
Block a user