// 战斗日志,都是主线程中发送 public void fightLog(string message) { if (MThread.isMainThread()) { foreach (LogDeviceBase logDevice in m_fightLogDeviceList) { logDevice.logout(message, LogColor.LOG); } } }
public void log(string message) { //StackTrace stackTrace = new StackTrace(true); //string traceStr = stackTrace.ToString(); //message = string.Format("{0}\n{1}", message, traceStr); if (MThread.isMainThread()) { logout(message, LogColor.LOG); } else { asyncLog(message); } }
public void error(string message) { StackTrace stackTrace = new StackTrace(true); string traceStr = stackTrace.ToString(); message = string.Format("{0}\n{1}", message, traceStr); if (MThread.isMainThread()) { logout(message, LogColor.ERROR); } else { asyncError(message); } }