/// <summary> 添加日志 /// </summary> /// <param name="item"></param> /// <param name="currAccDbName"></param> /// <returns></returns> public static bool Add(UserOPLog item, string currAccDbName) { Dictionary<string, string> DicParam = new Dictionary<string, string>(); DicParam.Add("ClientUserID", item.userOP.UserID); DicParam.Add("OPName", item.userOP.OPName); DicParam.Add("LogID", System.Guid.NewGuid().ToString()); DicParam.Add("SQLStr", item.sqlStr.Replace('\'','"')); DicParam.Add("paramsStr", item.sqlParams.Replace('\'', '"')); DicParam.Add("OPTime", item.timeTicks.ToString()); DicParam.Add("exeResult", item.exeResult ? "1" : "0"); return DBHelper.Submit_AddLog("添加日志", currAccDbName, "tl_ClientUser", "", "", DicParam); }
/// <summary> 记录用户操作日志 /// </summary> /// <param name="uOpLog">日志信息</param> private static void writeUserOpLog(UserOPLog uOpLog) { UserOPLogClass.Instance.Add(uOpLog); }
public void Add (UserOPLog item) { UserOPLogQueue.Enqueue(item); Interlocked.Increment(ref queueLength); lock (SynObject) { if (queueLength > 10 && !runFlag) { ThreadPool.QueueUserWorkItem(new WaitCallback(NewThreadFunc)); } } }