Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.06.06;
Скачать: CL | DM;

Вниз

Ведение логов   Найти похожие ветки 

 
sesh   (2004-05-24 14:09) [0]

Подскажите как проще и надежнее вести логи работы своей программы, может у кого есть фенкция написана, или есть стандвртная, подскажите, поделитесь


 
ega23 ©   (2004-05-24 14:21) [1]

Есть такая фенкция. Могу поделиться:

Procedure WriteLog(aLogStr:String;aSessInfo:TSessInfo;aLogFileNAme:string=LogFileNAmeGlb; LogOn:boolean=true);
var ss,fn: string;
   f:textfile;
begin
if not LogOn then exit;
fn:=ExtractFilePath(Paramstr(0))+aLogFileNAme;
try
 AssignFile(f,FN);
 if fileExists(fn) then   Append(f) else rewrite(f);
 ss:=FormatDateTime("dd-mm-yy hh:nn:ss ",now)+
     "wc:"+inttostr(aSessInfo.Workcod)+" "+
     "mc:"+inttostr(aSessInfo.modcod)+" "+
     "op:"+inttostr(aSessInfo.opercod)+" "+
     "ms:"+inttostr(aSessInfo.modstate)+"  "; //Dec2Hex(aSessInfo.modstate,16)+"  ";
 ss:=ss+aLogStr;
 ss:=DelChars(ss,CR);  ss:=DelChars(ss,LF);
 Writeln(f,ss);
 CloseFile(f);
 except
 end;
end;



Страницы: 1 вся ветка

Текущий архив: 2004.06.06;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.021 c
14-1084547430
lancelot
2004-05-14 19:10
2004.06.06
Полный абзац


1-1085219922
mister
2004-05-22 13:58
2004.06.06
как из hex перевести в int?


14-1084859063
WondeRu
2004-05-18 09:44
2004.06.06
Мисс Америка 2004


14-1084855157
Vlad Oshin
2004-05-18 08:39
2004.06.06
Научите, как узнать для чего и какая dll нужна в папках windows


1-1085055046
BFG9k
2004-05-20 16:10
2004.06.06
ValueListEditor2