Browse Source

打开日志,去掉异常中间件

bjmzak
wxd 2 years ago
parent
commit
f6bec04557
  1. 10
      src/Shentun.Peis.Application.Contracts/PatientRegisters/GetPeisRecordListDto.cs
  2. 28
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs
  3. 3
      src/Shentun.Peis.HttpApi.Host/Program.cs

10
src/Shentun.Peis.Application.Contracts/PatientRegisters/GetPeisRecordListDto.cs

@ -43,6 +43,16 @@ namespace Shentun.Peis.PatientRegisters
/// </summary>
public char? IsFilterPreRegistration { get; set; } = 'N';
/// <summary>
/// 项目审核状态
/// </summary>
public char? AsbitemIsAudit { get; set; }
/// <summary>
/// 项目检查状态
/// </summary>
public char? AsbitemCompleteFlag { get; set; }
/// <summary>
/// 组合项目ID 集合
/// </summary>

28
src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

@ -140,16 +140,16 @@ public class PeisHttpApiHostModule : AbpModule
//});
#region 临时去掉日志
//关闭审计日志
Configure<AbpAuditingOptions>(options =>
{
options.IsEnabled = false;
});
//关闭安全日志
Configure<AbpSecurityLogOptions>(options =>
{
options.IsEnabled = false;
});
////关闭审计日志
//Configure<AbpAuditingOptions>(options =>
//{
// options.IsEnabled = false;
//});
////关闭安全日志
//Configure<AbpSecurityLogOptions>(options =>
//{
// options.IsEnabled = false;
//});
#endregion
//防伪令牌
@ -457,14 +457,14 @@ public class PeisHttpApiHostModule : AbpModule
config.UsePostgreSqlStorage(configuration.GetConnectionString("Default"));
});
}
public override async void OnApplicationInitialization(ApplicationInitializationContext context)
public override async void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
var configuration = context.GetConfiguration();
//请求错误提示配置
app.UseErrorHandling();
// app.UseErrorHandling();
if (env.IsDevelopment())
{
@ -559,7 +559,7 @@ public class PeisHttpApiHostModule : AbpModule
app.UseConfiguredEndpoints();
//任务计划
await StartScheduler(context);
await StartScheduler(context);
}
private async Task StartScheduler(ApplicationInitializationContext context)
@ -575,7 +575,7 @@ public class PeisHttpApiHostModule : AbpModule
{
foreach (var thirdInterfaceDto in thirdInterFaceForHostOutDto.Data)
{
if(thirdInterfaceDto.IsActive != 'Y')
if (thirdInterfaceDto.IsActive != 'Y')
{
continue;
}

3
src/Shentun.Peis.HttpApi.Host/Program.cs

@ -21,7 +21,8 @@ public class Program
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt", rollingInterval: RollingInterval.Day))
.WriteTo.Async(c => c.File("Logs/logs.txt", LogEventLevel.Information, rollingInterval: RollingInterval.Day))
.WriteTo.Async(c => c.File("Logs/error.txt", LogEventLevel.Error, rollingInterval: RollingInterval.Day))
.WriteTo.Async(c => c.Console())
.CreateLogger();

Loading…
Cancel
Save