Skip to content

Commit

Permalink
#751: Change audit log message
Browse files Browse the repository at this point in the history
  • Loading branch information
ycanardeau committed Jul 4, 2021
1 parent cab3a77 commit d80c5bf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions VocaDbModel/Database/Queries/TagQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,9 @@ public void UpdateEntryMappings(TagEntryMappingContract[] mappings)

ctx.Sync(diff);

ctx.AuditLogger.AuditLog($"updated entry type / tag mappings ({diff.Added.Length} additions, {diff.Removed.Length} deletions)");
ctx.AuditLogger.SysLog($"added [{string.Join(", ", diff.Added.Select(t => t.Tag.DefaultName))}], deleted [{string.Join(", ", diff.Removed.Select(t => t.Tag.DefaultName))}]");
var diffMessage = $"added [{string.Join(", ", diff.Added.Select(t => t.Tag.DefaultName))}], deleted [{string.Join(", ", diff.Removed.Select(t => t.Tag.DefaultName))}]";
ctx.AuditLogger.AuditLog($"updated entry type / tag mappings ({diffMessage})");
ctx.AuditLogger.SysLog(diffMessage);
});
}

Expand All @@ -938,8 +939,9 @@ TagMapping CreateMapping(IDatabaseContext<Tag> ctx, TagMappingContract contract)

ctx.Sync(diff);

ctx.AuditLogger.AuditLog($"updated tag mappings ({diff.Added.Length} additions, {diff.Removed.Length} deletions)");
ctx.AuditLogger.SysLog($"added [{string.Join(", ", diff.Added.Select(t => t.Tag.DefaultName))}], deleted [{string.Join(", ", diff.Removed.Select(t => t.Tag.DefaultName))}]");
var diffMessage = $"added [{string.Join(", ", diff.Added.Select(t => t.Tag.DefaultName))}], deleted [{string.Join(", ", diff.Removed.Select(t => t.Tag.DefaultName))}]";
ctx.AuditLogger.AuditLog($"updated tag mappings ({diffMessage})");
ctx.AuditLogger.SysLog(diffMessage);
});
}

Expand Down

0 comments on commit d80c5bf

Please sign in to comment.