csharp 将事件日志记录添加到UserAudit表
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 将事件日志记录添加到UserAudit表相关的知识,希望对你有一定的参考价值。
public void updateApiVendor(string username, Vendor existingVendor, Vendor updatedVendor)
{
UserAudit toUpdate = create();
toUpdate.AuditType = UserAudit.ADMIN_APIVENDOR_EDIT;
toUpdate.Message =
$"Updated vendor with id: {existingVendor.VendorId}. (old, new): VendorName ({existingVendor.VendorName}, {updatedVendor.VendorName})" + " " +
$"SendNotificationsViaApi ({existingVendor.SendNotificationsViaApi}, {updatedVendor.SendNotificationsViaApi})" + " " +
$"StandardApiEndpoint ({existingVendor.StandardApiEndpoint}, {updatedVendor.StandardApiEndpoint})" + " " +
$"OutboundUsername ({existingVendor.OutboundUsername}, {updatedVendor.OutboundUsername})" + " " +
$"OutboundPassword ({existingVendor.OutboundPassword}, {updatedVendor.OutboundPassword})" + " " +
$"SendInvite ({existingVendor.SendInvite}, {updatedVendor.SendInvite})" + " " +
$"Seamless ({existingVendor.Seamless}, {updatedVendor.Seamless})" + " " +
$"DateDosSigned ({existingVendor.DateDosSigned}, {updatedVendor.DateDosSigned})" + " " +
$"DateTestBegin ({existingVendor.DateTestBegin}, {updatedVendor.DateTestBegin})" + " " +
$"ActiveDate ({existingVendor.ActiveDate}, {updatedVendor.ActiveDate})" + " " +
$"InactiveDate ({existingVendor.InactiveDate}, {updatedVendor.InactiveDate})" + " " +
$"CertificateRequirements ({existingVendor.CertificateRequirements}, {updatedVendor.CertificateRequirements})";
userAuditRepository.add(toUpdate);
}
public void addApiVendor(string username, Vendor vendor)
{
UserAudit toUpdate = create();
toUpdate.AuditType = UserAudit.ADMIN_APIVENDOR_ADD;
toUpdate.Message =
$"Added vendor with id: {vendor.VendorId}. SendNotificationsViaApi: {vendor.SendNotificationsViaApi}" + " " +
$"StandardApiEndpoint: {vendor.StandardApiEndpoint}" + " " +
$"StandardApiEndpoint: {vendor.StandardApiEndpoint}" + " " +
$"OutboundUsername: {vendor.OutboundUsername}" + " " +
$"OutboundPassword: {vendor.OutboundPassword}" + " " +
$"SendInvited: {vendor.SendInvite}" + " " +
$"Seamless: {vendor.Seamless}" + " " +
$"DateDosSigned: {vendor.DateDosSigned}" + " " +
$"DateTestBegin: {vendor.DateTestBegin}" + " " +
$"ActiveDate: {vendor.ActiveDate}" + " " +
$"InactiveDate: {vendor.InactiveDate}" + " " +
$"CertificateRequirements: {vendor.CertificateRequirements}";
userAuditRepository.add(toUpdate);
}
public const int ADMIN_APIVENDOR_EDIT = 1112;
public const int ADMIN_APIVENDOR_ADD = 1113;
以上是关于csharp 将事件日志记录添加到UserAudit表的主要内容,如果未能解决你的问题,请参考以下文章
如何将我的 java 应用程序日志记录事件映射到 GCP Felexible 非兼容 App Engine 中相应的云日志记录事件级别?
Laravel框架中如何使用事件记录SQL查询到日志
ini 使用nxlog和JSON传输将Windows事件日志信息记录到Logstash
如何将钩子添加到 zap 记录器中?
syslog的接收日志
是否可以仅将错误日志发送到事件中心?