Форум: "Основная";
Текущий архив: 2004.06.06;
Скачать: [xml.tar.bz2];
ВнизВедение логов Найти похожие ветки
← →
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;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.032 c