Browse Source

Added HttpMethod & Url to audit log in module

pull/395/head
Yunus Emre Kalkan 8 years ago
parent
commit
cb459e356e
  1. 4
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AuditLogConsts.cs
  2. 6
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs
  3. 2
      modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingtDbContextModelBuilderExtensions.cs

4
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain.Shared/Volo/Abp/AuditLogging/AuditLogConsts.cs

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

6
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs

@ -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);

2
modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingtDbContextModelBuilderExtensions.cs

@ -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