mirror of https://github.com/abpframework/abp
#2597 Refactor AbpAspNetCoreSerilogOptions
parent
da4c91cabd
commit
c88cd2054e
@ -1,21 +0,0 @@
|
||||
namespace Volo.Abp.AspNetCore.Serilog
|
||||
{
|
||||
public class AbpAspNetCoreSerilogEnrichersOptions
|
||||
{
|
||||
public string TenantIdEnricherPropertyName { get; set; }
|
||||
|
||||
public string UserIdEnricherPropertyName { get; set; }
|
||||
|
||||
public string ClientIdEnricherPropertyName { get; set; }
|
||||
|
||||
public string CorrelationIdPropertyName { get; set; }
|
||||
|
||||
public AbpAspNetCoreSerilogEnrichersOptions()
|
||||
{
|
||||
TenantIdEnricherPropertyName = AbpSerilogEnrichersConsts.TenantIdEnricherPropertyName;
|
||||
UserIdEnricherPropertyName = AbpSerilogEnrichersConsts.UserIdEnricherPropertyName;
|
||||
ClientIdEnricherPropertyName = AbpSerilogEnrichersConsts.ClientIdEnricherPropertyName;
|
||||
CorrelationIdPropertyName = AbpSerilogEnrichersConsts.CorrelationIdPropertyName;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using Volo.Abp.AspNetCore;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
@ -0,0 +1,30 @@
|
||||
namespace Volo.Abp.AspNetCore.Serilog
|
||||
{
|
||||
public class AbpAspNetCoreSerilogOptions
|
||||
{
|
||||
public AllEnricherPropertyNames EnricherPropertyNames { get; } = new AllEnricherPropertyNames();
|
||||
|
||||
public class AllEnricherPropertyNames
|
||||
{
|
||||
/// <summary>
|
||||
/// Default value: "TenantId".
|
||||
/// </summary>
|
||||
public string TenantId { get; set; } = "TenantId";
|
||||
|
||||
/// <summary>
|
||||
/// Default value: "UserId".
|
||||
/// </summary>
|
||||
public string UserId { get; set; } = "UserId";
|
||||
|
||||
/// <summary>
|
||||
/// Default value: "ClientId".
|
||||
/// </summary>
|
||||
public string ClientId { get; set; } = "ClientId";
|
||||
|
||||
/// <summary>
|
||||
/// Default value: "CorrelationId".
|
||||
/// </summary>
|
||||
public string CorrelationId { get; set; } = "CorrelationId";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Volo.Abp.AspNetCore.Serilog
|
||||
{
|
||||
public class AbpSerilogEnrichersConsts
|
||||
{
|
||||
public const string TenantIdEnricherPropertyName = "TenantId";
|
||||
public const string UserIdEnricherPropertyName = "UserId";
|
||||
public const string ClientIdEnricherPropertyName = "ClientId";
|
||||
public const string CorrelationIdPropertyName = "CorrelationId";
|
||||
}
|
||||
}
|
Loading…
Reference in new issue