⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log.cpp

📁 2002年
💻 CPP
字号:

#include "log.h"
#include "client.h"
#include "clientparam.h"

LogInfo Log::rec;
LogInfo Log::recmsg;
LogInfo Log::logmat;


Log::Log()
{

}

Log::~Log()
{

}

void Log::InitLog()
{
#ifdef _LOG
	rec.AssociateFile(ClientParam::logfile);

	rec.SetLabel(LOG_SYNC, "Sync");
	rec.SetLabel(LOG_NONE,"");
	rec.SetLabel(LOG_SENDACTION, "SendAction");
	rec.SetLabel(LOG_STOPWATCH,"Time");
	rec.SetLabel(LOG_ACTION, "Action");
	rec.SetLabel(LOG_UPDATE, "Update");
	rec.SetLabel(LOG_MISS, "Miss");
	rec.SetLabel(LOG_COLLIDE, "Coll");
	rec.SetLabel(LOG_KICK, "Kick");
	rec.SetLabel(LOG_UNKPLAYER, "Unk P");
	rec.SetLabel(LOG_HEAR, "Hear");
	rec.SetLabel(LOG_IT, "Interception");
	rec.SetLabel(LOG_PASS,"Pass"); 
	rec.SetLabel(LOG_SEE,"See");
	rec.SetLabel(LOG_DEFENSE, "Defense");
	rec.SetLabel(LOG_MEDIATION, "Mediation");
	rec.SetLabel(LOG_BUG, "BUG");
	rec.SetLabel(LOG_SITUATION, "Situation");
	rec.SetLabel(LOG_GOALIE, "Goalie");
	rec.SetLabel(LOG_SETPLAY, "SetPlay");
	rec.SetLabel(LOG_POSITIONING, "Positioning");
	rec.SetLabel(LOG_DRIBBLE,"Dribble");
	rec.SetLabel(LOG_OAKICK, "Oa kick");
	rec.SetLabel(LOG_VISUAL, "Visual");
	rec.SetLabel(LOG_DEFEXTEND, "Def extend");
	rec.SetLabel(LOG_VISUALREQ,"VReq");
	rec.SetLabel(LOG_VDEC, "VDec");
	rec.SetLabel(LOG_SHOOT, "Shoot");
	rec.SetLabel(LOG_HANDLEBALL, "HB");
	rec.SetLabel(LOG_OFFSIDE, "Offside");
	rec.SetLabel(LOG_PassRoute, "PR");
	rec.SetLabel(LOG_EvaPass, "Evapass");
	rec.SetLabel(LOG_DRIBBLELONG, "TQ"); 
	rec.SetLabel(LOG_OPosition, "Opos");
	rec.SetLabel(LOG_Situation, "AState");
	rec.SetLabel(LOG_PosScheme, "pos scheme");
	rec.SetLabel(LOG_TEAMFORMATION,"TEAM FORMATION");

	
	rec.SetLogOn(LOG_TEAMFORMATION);
	//rec.SetLogOn(LOG_NONE);
	//rec.SetLogOn(LOG_SENDACTION);
	//rec.SetLogOn(LOG_ACTION);
	//rec.SetLogOn(LOG_STOPWATCH); 
//	rec.SetLogOn(LOG_Situation);
//	rec.SetLogOn(LOG_PosScheme); 
	//rec.SetLogOn(LOG_SETPLAY); 
	//rec.SetLogOn(LOG_UPDATE); 
	//rec.SetLogOn(LOG_SEE); 
	//rec.SetLogOn(LOG_IT);
	//rec.SetLogOn(LOG_DRIBBLE);
	//rec.SetLogOn(LOG_PASS);
	//rec.SetLogOn(LOG_PassRoute);
	//rec.SetLogOn(LOG_EvaPass);
//	rec.SetLogOn(LOG_HANDLEBALL);
	//rec.SetLogOn(LOG_DEFEXTEND); 
	//rec.SetLogOn(LOG_POSITIONING);
	rec.SetLogOn(LOG_OFFSIDE);
	//rec.SetLogOn(LOG_UPDATE);
	//rec.SetLogOn(LOG_UNKPLAYER);
	//rec.SetLogOn(LOG_VDEC); 
	//rec.SetLogOn(LOG_MEDIATION); 
	//rec.SetLogOn(LOG_DRIBBLE); 
	//rec.SetLogOn(LOG_OAKICK);
	//rec.SetLogOn(LOG_MISS);
	//rec.SetLogOn(LOG_SHOOT);
	//rec.Setlogstartime(-1);
	#ifdef _OffClient
		rec.SetLogOff(LOG_STOPWATCH); 
		//rec.SetLogOn(LOG_VDEC); 
		rec.SetLogOn(LOG_SHOOT);
		//rec.SetLogOn(LOG_HEAR);
		//rec.SetLogOn(LOG_DRIBBLELONG); 
	#endif
#endif

#ifndef _OffClient
#ifdef _LOGMSG
	recmsg.AssociateFile(ClientParam::recfile);

	recmsg.SetLabel(LOG_SYNC,"Sync");
	recmsg.SetLabel(LOG_STOPWATCH,"Time");
	recmsg.SetLabel(LOG_HEAR, "Hear");
	recmsg.SetLabel(LOG_MISS, "Miss");

	//recmsg.SetLogOn(LOG_NONE);
	//recmsg.SetLogOn(LOG_HEAR);
	//recmsg.SetLogOn(LOG_MISS);
	recmsg.SetLogOn(LOG_STOPWATCH); 
	//recmsg.SetLogOn(LOG_SYNC);
	//recmsg.Setlogstartime(); 
#endif
#endif

#ifdef _LOGMAT 
	#ifndef _OffClient
		logmat.AssociateFile(ClientParam::matfile);
		logmat.Init_Mutex_Guard();
		
		char* channel_str[] = LM_Channel_Label;
		logmat.SetLabel(LM_Init, channel_str[LM_Init]);
		logmat.SetLabel(LM_Info, channel_str[LM_Info]);
		logmat.SetLabel(LM_Upd, channel_str[LM_Upd]);
		logmat.SetLabel(LM_Exec, channel_str[LM_Exec]);
		logmat.SetLabel(LM_Ass, channel_str[LM_Ass]);
		logmat.SetLabel(LM_Watch, channel_str[LM_Watch]);
		logmat.SetLogOn(LM_Init);
		logmat.SetLogOn(LM_Info);
		logmat.SetLogOn(LM_Upd); 
		logmat.SetLogOn(LM_Exec);
		logmat.SetLogOn(LM_Ass); 		
		logmat.SetLogOn(LM_Watch); 
	#endif
#endif
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -