From 4dbc17ea3f821826ae3f9cf14f4e71ca03026d7d Mon Sep 17 00:00:00 2001 From: Alper Ebicoglu Date: Mon, 31 Dec 2018 14:52:24 +0300 Subject: [PATCH] closes volosoft/vs-internal#548. Truncate added for Exceptions, Comments properties. --- .../Volo/Abp/AuditLogging/AuditLog.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs index f27e4d1e63..744d9e2a20 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs @@ -70,8 +70,8 @@ namespace Volo.Abp.AuditLogging ExtraProperties = auditInfo.ExtraProperties.ToDictionary(pair => pair.Key, pair => pair.Value); EntityChanges = auditInfo.EntityChanges.Select(e => new EntityChange(guidGenerator, Id, e)).ToList(); Actions = auditInfo.Actions.Select(e => new AuditLogAction(guidGenerator.Create(), Id, e)).ToList(); - Exceptions = auditInfo.Exceptions.JoinAsString(Environment.NewLine); - Comments = auditInfo.Comments.JoinAsString(Environment.NewLine); + Exceptions = auditInfo.Exceptions.JoinAsString(Environment.NewLine).Truncate(AuditLogConsts.MaxExceptionsLength); + Comments = auditInfo.Comments.JoinAsString(Environment.NewLine).Truncate(AuditLogConsts.MaxCommentsLength); } } }