4 changed files with 88 additions and 85 deletions
@ -1,25 +1,27 @@ |
|||||
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch; |
using System.Text.Json.Serialization; |
||||
|
|
||||
|
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch; |
||||
|
|
||||
public class SerilogException |
public class SerilogException |
||||
{ |
{ |
||||
[Nest.PropertyName("SourceContext")] |
[JsonPropertyName("SourceContext")] |
||||
public int Depth { get; set; } |
public int Depth { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ClassName")] |
[JsonPropertyName("ClassName")] |
||||
public string Class { get; set; } |
public string Class { get; set; } |
||||
|
|
||||
[Nest.PropertyName("Message")] |
[JsonPropertyName("Message")] |
||||
public string Message { get; set; } |
public string Message { get; set; } |
||||
|
|
||||
[Nest.PropertyName("Source")] |
[JsonPropertyName("Source")] |
||||
public string Source { get; set; } |
public string Source { get; set; } |
||||
|
|
||||
[Nest.PropertyName("StackTraceString")] |
[JsonPropertyName("StackTraceString")] |
||||
public string StackTrace { get; set; } |
public string StackTrace { get; set; } |
||||
|
|
||||
[Nest.PropertyName("HResult")] |
[JsonPropertyName("HResult")] |
||||
public int HResult { get; set; } |
public int HResult { get; set; } |
||||
|
|
||||
[Nest.PropertyName("HelpURL")] |
[JsonPropertyName("HelpURL")] |
||||
public string HelpURL { get; set; } |
public string HelpURL { get; set; } |
||||
} |
} |
||||
|
|||||
@ -1,56 +1,57 @@ |
|||||
using LINGYUN.Abp.Serilog.Enrichers.Application; |
using LINGYUN.Abp.Serilog.Enrichers.Application; |
||||
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; |
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; |
||||
using System; |
using System; |
||||
|
using System.Text.Json.Serialization; |
||||
|
|
||||
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch; |
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch; |
||||
|
|
||||
public class SerilogField |
public class SerilogField |
||||
{ |
{ |
||||
[Nest.PropertyName(AbpSerilogUniqueIdConsts.UniqueIdPropertyName)] |
[JsonPropertyName(AbpSerilogUniqueIdConsts.UniqueIdPropertyName)] |
||||
public long UniqueId { get; set; } |
public long UniqueId { get; set; } |
||||
|
|
||||
[Nest.PropertyName(AbpLoggingEnricherPropertyNames.MachineName)] |
[JsonPropertyName(AbpLoggingEnricherPropertyNames.MachineName)] |
||||
public string MachineName { get; set; } |
public string MachineName { get; set; } |
||||
|
|
||||
[Nest.PropertyName(AbpLoggingEnricherPropertyNames.EnvironmentName)] |
[JsonPropertyName(AbpLoggingEnricherPropertyNames.EnvironmentName)] |
||||
public string Environment { get; set; } |
public string Environment { get; set; } |
||||
|
|
||||
[Nest.PropertyName(AbpSerilogEnrichersConsts.ApplicationNamePropertyName)] |
[JsonPropertyName(AbpSerilogEnrichersConsts.ApplicationNamePropertyName)] |
||||
public string Application { get; set; } |
public string Application { get; set; } |
||||
|
|
||||
[Nest.PropertyName("SourceContext")] |
[JsonPropertyName("SourceContext")] |
||||
public string Context { get; set; } |
public string Context { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ActionId")] |
[JsonPropertyName("ActionId")] |
||||
public string ActionId { get; set; } |
public string ActionId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ActionName")] |
[JsonPropertyName("ActionName")] |
||||
public string ActionName { get; set; } |
public string ActionName { get; set; } |
||||
|
|
||||
[Nest.PropertyName("RequestId")] |
[JsonPropertyName("RequestId")] |
||||
public string RequestId { get; set; } |
public string RequestId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("RequestPath")] |
[JsonPropertyName("RequestPath")] |
||||
public string RequestPath { get; set; } |
public string RequestPath { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ConnectionId")] |
[JsonPropertyName("ConnectionId")] |
||||
public string ConnectionId { get; set; } |
public string ConnectionId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("CorrelationId")] |
[JsonPropertyName("CorrelationId")] |
||||
public string CorrelationId { get; set; } |
public string CorrelationId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ClientId")] |
[JsonPropertyName("ClientId")] |
||||
public string ClientId { get; set; } |
public string ClientId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("UserId")] |
[JsonPropertyName("UserId")] |
||||
public string UserId { get; set; } |
public string UserId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("TenantId")] |
[JsonPropertyName("TenantId")] |
||||
public Guid? TenantId { get; set; } |
public Guid? TenantId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ProcessId")] |
[JsonPropertyName("ProcessId")] |
||||
public int ProcessId { get; set; } |
public int ProcessId { get; set; } |
||||
|
|
||||
[Nest.PropertyName("ThreadId")] |
[JsonPropertyName("ThreadId")] |
||||
public int ThreadId { get; set; } |
public int ThreadId { get; set; } |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue