예제 #1
0
파일: ut.cpp 프로젝트: adobekan/qminer
//////////////////////////////////////
// Log-Notify
void TLogNotify::OnStatus(const TStr& MsgStr) {
	TTm NowTm = TTm::GetCurLocTm();
	Notify->OnStatus(TStr::Fmt("[%s %s] %s", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		MsgStr.CStr()));
}
예제 #2
0
void TFileNotify::OnStatus(const TStr& MsgStr) {
	TTm NowTm = TTm::GetCurLocTm();
	File->PutStrFmt("[%s %s] %s\n", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		MsgStr.CStr());
	File->Flush();
}
예제 #3
0
void TFileNotify::OnNotify(const TNotifyType& Type, const TStr& MsgStr){
	TStr TypeStr = "";
	if (Type==ntInfo) TypeStr = "INFO";
	else if (Type == ntErr) TypeStr = "ERROR";
	else if (Type == ntWarn) TypeStr = "WARNING";
	else if (Type == ntStat) TypeStr = "STAT";

	TTm NowTm = TTm::GetCurLocTm();
	
	File->PutStrFmt("[%s %s] %s: %s\n", 
		NowTm.GetYMDDashStr().CStr(), 
		NowTm.GetHMSTColonDotStr(true, false).CStr(), 
		TypeStr.CStr(),
		MsgStr.CStr());
	File->Flush();
}