/// <summary> /// 接口异常日志 /// </summary> /// <param name="outSysCode"></param> /// <param name="type"></param> /// <param name="level"></param> /// <param name="ex"></param> public void LogIOServiceLog(string outSysCode, IOEventType type, EventLevel level, Exception ex) { try { if (!string.IsNullOrWhiteSpace(outSysCode)) { InterfaceLogInfoProxy info = new InterfaceLogInfoProxy { CreateTime = DateTime.Now, Creator = "MES System", EventDescription = ex.StackTrace, EventLevel = level.ToString(), EventName = ex.Message, EventType = type.ToString(), LogID = Guid.NewGuid(), OutSysCode = Guid.Parse(outSysCode) }; WriteInterfaceServiceLog(info); } } catch (Exception exNew) { this.LogError(null, null, string.Empty, level, exNew); throw; } }
public IOEventResult(object sender, IOEventType type, byte[] buffer, int startIndex, int length, int result) { Sender = sender; EventType = type; Result = result; if (buffer != null) { Buffer = new byte[length]; Array.Copy(buffer, startIndex, Buffer, 0, Buffer.Length); } }
public IOEventResult(object sender, IOEventType type, int result) { Sender = sender; EventType = type; Result = result; }
internal IOEventArgs(IOEventType type, Byte value) { mType = type; mValue = value; }
/// <summary> /// 接口异常日志 /// </summary> /// <param name="outSysCode"></param> /// <param name="type"></param> /// <param name="level"></param> /// <param name="ex"></param> public static void LogIOServiceLog(string outSysCode, IOEventType type, EventLevel level, Exception ex) { Log4NetHelper.Instance.LogIOServiceLog(outSysCode, type, level, ex); }
/// <summary> /// 接口非异常日志 /// </summary> /// <param name="outSysCode"></param> /// <param name="type"></param> /// <param name="level"></param> /// <param name="eventName"></param> /// <param name="desc"></param> public static void LogIOServiceLog(string outSysCode, IOEventType type, EventLevel level, string eventName, string desc) { Log4NetHelper.Instance.LogIOServiceLog(outSysCode, type, level, eventName, desc); }