add log to placement and retirement
This commit is contained in:
parent
f1460dd384
commit
c0fbfd9c9b
4 changed files with 96 additions and 89 deletions
|
|
@ -68,8 +68,8 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.Services.AddAuthorization();
|
builder.Services.AddAuthorization();
|
||||||
|
|
||||||
// use serilog
|
// use serilog
|
||||||
ConfigureLogs();
|
//ConfigureLogs();
|
||||||
builder.Host.UseSerilog();
|
//builder.Host.UseSerilog();
|
||||||
|
|
||||||
// Add config CORS
|
// Add config CORS
|
||||||
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
|
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
|
||||||
|
|
@ -153,6 +153,8 @@ var app = builder.Build();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
|
app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
Authorization = new[] { new CustomAuthorizeFilter() }
|
Authorization = new[] { new CustomAuthorizeFilter() }
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ElasticConfiguration": {
|
"ElasticConfiguration": {
|
||||||
"Uri": "http://localhost:9200"
|
"Uri": "http://192.168.1.40:9200",
|
||||||
|
"IndexFormat": "bma-ehr-log-index",
|
||||||
|
"SystemName": "placement"
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
builder.Services.AddAuthorization();
|
builder.Services.AddAuthorization();
|
||||||
|
|
||||||
// use serilog
|
// use serilog
|
||||||
ConfigureLogs();
|
//ConfigureLogs();
|
||||||
builder.Host.UseSerilog();
|
//builder.Host.UseSerilog();
|
||||||
|
|
||||||
// Add config CORS
|
// Add config CORS
|
||||||
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
|
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
|
||||||
|
|
@ -161,6 +161,7 @@ var app = builder.Build();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseMiddleware<ErrorHandlerMiddleware>();
|
app.UseMiddleware<ErrorHandlerMiddleware>();
|
||||||
|
app.UseMiddleware<RequestLoggingMiddleware>();
|
||||||
|
|
||||||
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
app.UseHangfireDashboard("/hangfire", new DashboardOptions()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ElasticConfiguration": {
|
"ElasticConfiguration": {
|
||||||
"Uri": "http://localhost:9200"
|
"Uri": "http://192.168.1.40:9200",
|
||||||
|
"IndexFormat": "bma-ehr-log-index",
|
||||||
|
"SystemName": "retirement"
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue