////////////////////////////////////// // 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())); }
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(); }
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(); }