in D7 I use the following source code to debug (to a log file) the
Indy FTP Client component:
var
Debug :TIdLogDebug;
FTPClient : TIdFTP;
Debug:= TIdLogDebug.Create(Nil);
Debug.Filename:='c:\temp\debug.log';
Debug.Target:= ltFile;
Debug.Active:= True;
FTPClient:= TIdFTP.Create(Nil);
FTPClient.Intercept:= TIdConnectionIntercept(Debug);
It works fine and for example I got the following log file:
14.02.2005 12:17:20: Erh.: 220 TESTFTPSERVER Microsoft FTP Service
(Version 5.0).<EOL>
14.02.2005 12:17:20: Gesendet: user ldctest2<EOL>
14.02.2005 12:17:20: Erh.: 331 Password required for ldctest2.<EOL>
14.02.2005 12:17:20: Gesendet: pass 123<EOL>
14.02.2005 12:17:20: Erh.: 230 User ldctest2 logged in.<EOL>
14.02.2005 12:17:20: Gesendet: type I<EOL>
14.02.2005 12:17:20: Erh.: 200 Type set to I.<EOL>
14.02.2005 12:17:20: Gesendet: syst<EOL>
14.02.2005 12:17:20: Erh.: 215 Windows_NT version 5.0<EOL>
14.02.2005 12:17:20: Gesendet: PWD<EOL>
14.02.2005 12:17:20: Erh.: 257 "/" is current directory.<EOL>
Now I change to Delphi 2005 and Indy 10. How It works with Indy 10 ? I
use the TIdLogFile component but the result poor.
Soure example:
var
Debug : TIdLogFile;
FTPClient : TIdFTP;
FTPClient:= TIdFTP.Create(Nil)
Debug:= TIdLogFile.Create(Nil);
Debug.Filename:= 'c:\temp\debug.log';
Debug.Active:= True;
Debug.Connect(FTPClient);
I got only the following log file:
Stat Connected.
In Indy 10 the property Intercept doesn't exists who it works with
Indy 10. Please can someone give me an example ?
Regards
Markus Hermann