private void Update() { while (Logger.logMsgQueue.get_Count() > 0) { Logger.LogUnit logUnit = Logger.logMsgQueue.Dequeue() as Logger.LogUnit; PandoraImpl pandoraImpl = Pandora.Instance.GetPandoraImpl(); switch (logUnit.level) { case Logger.LogLevel.kDEBUG: if (pandoraImpl.GetIsDebug()) { Logger.WriteLog(logUnit.msg); } break; case Logger.LogLevel.kINFO: if (pandoraImpl.GetIsDebug()) { Logger.WriteLog(logUnit.msg); } break; case Logger.LogLevel.kWARN: if (pandoraImpl.GetIsDebug()) { Logger.WriteLog(logUnit.msg); } break; case Logger.LogLevel.kERROR: if (pandoraImpl.GetIsDebug()) { Logger.WriteLog(logUnit.msg); } break; case Logger.LogLevel.kREPORT: if (pandoraImpl.GetIsNetLog()) { NetLogic netLogic = Pandora.Instance.GetNetLogic(); netLogic.StreamReport(logUnit.msg); } break; } } }
public void Init() { try { this.luaMgr = new LuaScriptMgr(); this.resMgr = new ResourceMgr(); this.netLogic = new NetLogic(); this.netLogic.Init(); Directory.CreateDirectory(Pandora.Instance.GetCachePath()); Directory.CreateDirectory(Pandora.Instance.GetImgPath()); Directory.CreateDirectory(Pandora.Instance.GetCookiePath()); Directory.CreateDirectory(Pandora.Instance.GetLogPath()); Directory.CreateDirectory(Pandora.Instance.GetTempPath()); } catch (Exception ex) { Logger.ERROR(ex.get_StackTrace()); } }