public void Append(global::Define.enumLogType logType, string strContents) { //LogInfo logInfo=new LogInfo(); //logInfo.Content=strContents; //logInfo.Time=DateTime.Now; //logInfo.Type=logType; //Environment.NHibernateHelper.SaveObject(logInfo); //Environment.NHibernateHelper.Flush(); //DataRow rowLog = m_DtLogCache.NewRow(); //m_DtLogCache.Rows.Add(rowLog); if (m_DtLogCache == null) { Init(); } object[] logInfo = { Guid.NewGuid().ToString("N"), null, null, logType, strContents, DateTime.Now }; m_DtLogCache.Rows.Add(logInfo); if (m_DtLogCache.Rows.Count == m_CacheCount) { Flush(); Init(); } }
public void AppendMessage(global::Define.enumLogType logType, string strMsg) { this.Append(logType, strMsg); }