Пример #1
0
 private void Logging(string msg, string stackTrace = "")
 {
     new Task(() =>
     {
         msg = "[" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "] " + msg;
         Invoke(new Action(() => AddMsg(msg)));
         LogFileHelper.InsertMsg(msg + (string.IsNullOrWhiteSpace(stackTrace) ? "" : stackTrace));
     }).Start();
 }
Пример #2
0
        public List <string> GetNotNoticeTaskList(string scanNum)
        {
            try
            {
                return(_userInfoService.GetNotNoticeList(int.Parse(scanNum)));
            }
            catch (Exception e)
            {
                LogFileHelper.InsertMsg("[获取需要更新状态的未提醒服务任务队列]出错" + " || 错误原因:" +
                                        (e.InnerException == null
                                             ? e.Message
                                             : e.InnerException.ToString()) +
                                        (string.IsNullOrWhiteSpace(e.StackTrace) ? "" : " || 堆栈信息:" + e.StackTrace));

                throw new WebFaultException(System.Net.HttpStatusCode.BadRequest);
            }
        }