1.找一支Server端程式加入以下Function
/// <summary>
/// 寫入EEP LOG
/// </summary>
/// <param name="method"></param>
/// <param name="message"></param>
public void EEPLog(string method, string message)
{
SysEEPLog eeplog = new SysEEPLog(this.GetClientInfo(), SysEEPLog.LogStyleType.UserDefine, SysEEPLog.LogTypeType.Error, DateTime.Now, method, message);
eeplog.Log();
}
2.在需要log的地方,例如server method傳入值,回傳值,自己下SQL語法,呼叫外部API時,用這句即可
this.EEPLog("模組名稱","訊息");
範例:
this.EEPLog(MethodBase.GetCurrentMethod().Name, strSQL);
3.在EEPNetServer上System Log要打開,並且一定要存到DB,不要存text file
4.EEPManager就可以直接查詢log,因此比一般log機制,要去作業系統log查看方便