Exemplo n.º 1
0
//////////////////////////////////////
// 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()));
}
Exemplo n.º 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();
}
Exemplo n.º 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();
}
Exemplo n.º 4
0
TStr TBackupProfile::GetFolderNameForCurrentTime() const
{
    TTm Now = TTm::GetCurLocTm();
    return Now.GetYMDDashStr() + " " + TStr::Fmt("%02d-%02d-%02d", Now.GetHour(), Now.GetMin(), Now.GetSec());
}