Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.025 c
1-1085504186
Mameluke
2004-05-25 20:56
2004.06.06
Работа с MS Word


14-1085149774
AlexKniga
2004-05-21 18:29
2004.06.06
Как садится муха на потолок?


14-1084785001
olookin
2004-05-17 13:10
2004.06.06
Предусматривает ли КЗОТ?


1-1085496946
init13
2004-05-25 18:55
2004.06.06
StringGrid


3-1084539243
Fishka
2004-05-14 16:54
2004.06.06
В ComboBox-е для каждого Item свой Hint




   Наверх