Re: FTP Log Commands?

Giganews Newsgroups
Subject: Re: FTP Log Commands?
Posted by:  Don (kingfi…
Date: Sat, 25 Feb 2006

> Why I do to show FTP commands? I try the OnStatus event but nothing, try
> TIdIOHandlerStack and TIdLogEvent but I don't see any FTP command message.

OnStatus is going receive notifications for changes in the status of the
connection only; like Connected, Disconnecting, and Disconnected.

If you want to capture the FTP commands and responses generated during a
session, TIdLogEvent can be used.  You have to implement the OnReceive,
OnSent, and OnStatus  event handlers in TIdLogEvent so that they do
something with the data received in the event notification.  This data will
include information exchanged on the control channel for the FTP connection,
but does not allow logging for content received on the data channel.

Assign an instance of TIdLogEvent (with event handlers assigned) to the
TIdFTP.IOHandler.Intercept property to enable the logging mechanism.

Another alternative is to use TIdLogFile to write the information to a file
instead using event notitifications.



In response to

FTP Log Commands? posted by Erick Phillipe R. de Almeida on Sat, 25 Feb 2006