static void WriteInitLog([CallerFilePath] string callerFilePath = null) { var STR_Enable_ServerType = Smart.Format("[OPLogger Init] IsEnable:{0}, ServerType:{1}, StartTime:{2}", IsEnable, ServerType, ServerStartTime); var STR_IP_ShortFilePath = Smart.Format("[OPLogger Init] IP:{0}, ShortFilePathName:{1}", ServerIP, ShortFilePathName(callerFilePath)); var STR_EnableTraceType = Smart.Format("[EnableTraceTypeNameList] {0:list:{}|, |,}", EnableTraceTypeNameList); var STR_DB = Smart.Format("DBConnectString:{0}, DBDatabaseName:{1}, ServerSettingCollectionName:{2}", DBConnectString, DBDatabaseName, ServerSettingCollectionName); var STR_Thread = Smart.Format("TIME_TO_SLEEP_BETWEEN_BATCHES_MILLSEC: {0}, MAX_LOG_COUNT_AT_IME_WRITE: {1}", TIME_TO_SLEEP_BETWEEN_BATCHES_MILLSEC, MAX_LOG_COUNT_AT_IME_WRITE); FileLogger.Info(STR_Enable_ServerType); var groupId = UniqueNumberManager.채번_받아오기(); Info(LOG_TYPE.SERVER_INIT, groupId, STR_Enable_ServerType); Info(LOG_TYPE.SERVER_INIT, groupId, STR_IP_ShortFilePath); Info(LOG_TYPE.SERVER_INIT, groupId, STR_EnableTraceType); Info(LOG_TYPE.SERVER_INIT, groupId, STR_DB); Info(LOG_TYPE.SERVER_INIT, groupId, STR_Thread); }
public static async Task <MemoryDBUserAuth> GetAuthInfo(string userID) { MemoryDBUserAuth userInfo; if (Cache.TryGetValue(userID, out userInfo)) { return(userInfo); } var traceId = UniqueNumberManager.채번_받아오기(); userInfo = await RequestServiceAPILoginServer.RequsetAuthCheckAsync(ServerConfig.ServiceName(), userID, traceId); if (userInfo.err == ERROR_CODE.NONE) { AddAuthInfo(userInfo, traceId); } return(userInfo); }
public static void Destory() { if (IsEnable == false) { return; } FileLogger.Info("로그인 서버 종료"); var 채번 = UniqueNumberManager.채번_받아오기(); Info(LOG_TYPE.SERVER_TERMINATE, 채번, "로그인 서버 종료"); // 로그 출력을 위해 잠시 대기 System.Threading.Thread.Sleep(1000); IsThreadRunning = false; if (WorkerThread.IsAlive) { WorkerThread.Join(); } }