Esempio n. 1
0
        /// <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;
            }
        }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 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);
     }
 }
Esempio n. 4
0
 public IOEventResult(object sender, IOEventType type, int result)
 {
     Sender = sender;
     EventType = type;
     Result = result;
 }
Esempio n. 5
0
 public IOEventResult(object sender, IOEventType type, int result)
 {
     Sender    = sender;
     EventType = type;
     Result    = result;
 }
Esempio n. 6
0
 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);
 }