How to use idLogevent [indy ver 10.0.76]

hi all
do any one knows how to use idLogEvent or idLogFile or idLogDebug [indy ver 10.0.76 ].
i'm using delphi 7.
thanks
mirghaniAsked:
Who is Participating?
 
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
Hi again

  I just notices it changed in indy 10, I tried this sample with D2005 and indy 10, you have to use TIdIOHandlerStack to link the IdHttp with IdLogFile

Here's the sample again for Indy 10

procedure TForm1.Button1Click(Sender: TObject);
begin
  idLogFile1.Filename := 'c:\indy10.log';
  idLogFile1.Active := True;

  IdIOHandlerStack1.Intercept :=idLogFile1;
  Idhttp1.IOHandler :=  IdIOHandlerStack1;

  idHttp1.Get('http://www.google.com');
end;

Regards,
Mohammed
0
 
Mohammed NasmanSoftware DeveloperCommented:
Hi

I have indy 9 with Delphi 7, but it should work in the same way with Indy 10

procedure TForm1.Button1Click(Sender: TObject);
begin
  idLogFile1.Filename := 'c:\indy.log';
  idLogFile1.Active := True;

  Idhttp1.Intercept := idLogFile1;

  idHttp1.Get('http://www.google.com');
end;

Regards,
mohammed
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.