Added HttpMethod & Url to audit log in module

pull/395/head
Yunus Emre Kalkan 7 years ago
parent 6492fdd158
commit cb459e356e

@ -11,5 +11,9 @@
public const int MaxExceptionsLength = 4000;
public const int MaxCommentsLength = 256;
public const int MaxUrlLength = 256;
public const int MaxHttpMethodLength = 16;
}
}

@ -29,6 +29,10 @@ namespace Volo.Abp.AuditLogging
public virtual string BrowserInfo { get; protected set; }
public virtual string HttpMethod { get; protected set; }
public virtual string Url { get; protected set; }
public virtual string Exceptions { get; protected set; }
public virtual string Comments { get; protected set; }
@ -54,6 +58,8 @@ namespace Volo.Abp.AuditLogging
ClientIpAddress = auditInfo.ClientIpAddress;
ClientName = auditInfo.ClientName;
BrowserInfo = auditInfo.BrowserInfo;
HttpMethod = auditInfo.HttpMethod;
Url = auditInfo.Url;
ImpersonatorUserId = auditInfo.ImpersonatorUserId;
ImpersonatorTenantId = auditInfo.ImpersonatorTenantId;
ExtraProperties = auditInfo.ExtraProperties.ToDictionary(pair => pair.Key, pair => pair.Value);

@ -27,6 +27,8 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
b.Property(x => x.ClientIpAddress).HasMaxLength(AuditLogConsts.MaxClientIpAddressLength).HasColumnName(nameof(AuditLog.ClientIpAddress));
b.Property(x => x.ClientName).HasMaxLength(AuditLogConsts.MaxClientNameLength).HasColumnName(nameof(AuditLog.ClientName));
b.Property(x => x.BrowserInfo).HasMaxLength(AuditLogConsts.MaxBrowserInfoLength).HasColumnName(nameof(AuditLog.BrowserInfo));
b.Property(x => x.HttpMethod).HasMaxLength(AuditLogConsts.MaxHttpMethodLength).HasColumnName(nameof(AuditLog.HttpMethod));
b.Property(x => x.Url).HasMaxLength(AuditLogConsts.MaxUrlLength).HasColumnName(nameof(AuditLog.Url));
b.Property(x => x.Exceptions).HasMaxLength(AuditLogConsts.MaxExceptionsLength).HasColumnName(nameof(AuditLog.Exceptions));
b.Property(x => x.Comments).HasMaxLength(AuditLogConsts.MaxCommentsLength).HasColumnName(nameof(AuditLog.Comments));
b.Property(x => x.ExecutionDuration).HasColumnName(nameof(AuditLog.ExecutionDuration));

Loading…
Cancel
Save