/// <summary> /// 上游支付错误写日志方法 /// </summary> /// <param name="userId">用户ID</param> /// <param name="message">错误消息</param> /// <param name="channelId">通道ID</param> /// <param name="errorType">下游错误类型[1:订单号重复,2:重复发起支付,3:其他]</param> /// <param name="location">报错位置</param> /// <param name="summary">错误摘要[可选]</param> /// <param name="ipAddress">客户端IP地址</param> public void UpstreamPaymentErrorLog(int userId, string message, string ipAddress, int channelId, EnumForLogForApi.ErrorType errorType, string location = "", string summary = "") { LogForApi.Message = message; LogForApi.IpAddress = ipAddress; LogForApi.Location = location; LogForApi.Summary = summary; LogForApi.CreatedOn = DateTime.Now; LogForApi.PlatformId = (int)EnumForLogForApi.Platform.UpstreamPaymentError; LogForApi.ErrorTypeId = (int)errorType; LogForApi.RelatedId = channelId; LogWriter.Write(LogForApi); }
public void Log(int userId, string message, string ipAddress, string location = "", string summary = "") { LogForApi.Message = message; LogForApi.IpAddress = ipAddress; LogForApi.Location = location; LogForApi.Summary = summary; LogForApi.CreatedOn = DateTime.Now; LogWriter.Write(LogForApi); }