Skip to content

Commit

Permalink
Logged exception (missed before).
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Apr 2, 2015
1 parent f5371b1 commit 3d742df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Abp.Zero/Auditing/AuditLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public class AuditLog : Entity<long>
/// <returns>The <see cref="AuditLog"/> object that is created using <see cref="auditInfo"/></returns>
public static AuditLog CreateFromAuditInfo(AuditInfo auditInfo)
{
var exceptionMessage = auditInfo.Exception != null ? auditInfo.Exception.ToString() : null;
return new AuditLog
{
TenantId = auditInfo.TenantId,
Expand All @@ -127,7 +128,8 @@ public static AuditLog CreateFromAuditInfo(AuditInfo auditInfo)
ExecutionDuration = auditInfo.ExecutionDuration,
ClientIpAddress = auditInfo.ClientIpAddress.TruncateWithPostfix(MaxClientIpAddressLength),
ClientName = auditInfo.ClientName.TruncateWithPostfix(MaxClientNameLength),
BrowserInfo = auditInfo.BrowserInfo.TruncateWithPostfix(MaxBrowserInfoLength)
BrowserInfo = auditInfo.BrowserInfo.TruncateWithPostfix(MaxBrowserInfoLength),
Exception = exceptionMessage.TruncateWithPostfix(MaxExceptionLength)
};
}

Expand Down

0 comments on commit 3d742df

Please sign in to comment.