Exemple #1
0
 public static void WriteFailure(IAuditor auditor, ApiOperationContext context, Exception e)
 {
     auditor.Write(new AuditItem(
                       Activity.Current?.Id ?? "no-activity-id",
                       false,
                       e.Message,
                       GetUserId(context),
                       context.Operation));
 }
Exemple #2
0
 public static void WriteSuccess(IAuditor auditor, ApiOperationContext context)
 {
     auditor.Write(new AuditItem(
                       Activity.Current?.Id ?? "no-activity-id",
                       true,
                       "Success",
                       GetUserId(context),
                       context.Operation));
 }