Re: How to use IdLog Components

Giganews Newsgroups
Subject: Re: How to use IdLog Components
Posted by:  Remy Lebeau (TeamB) (
Date: Wed, 17 Mar 2004

"Stefan Bartos" <s…> wrote in message

> I'm trying to use the IdLogxxx - Components (Indy9)  to catch
> some information running between a Client (MS OE) and Server
> (IdSMTPServer). But I can't get them to work. I've put some
> code in the event routines of the IdLog-Components, I've
> activated them, but nothing is happen.

Did you actually attach the TIdLog... component to the connection's
Intercept property?  They won't do anything otherwise.

Since you are making a server, you will have to attach the component in the
server's OnConnect event, ie:

    procedure TForm1.IdSMTPServer1Connect(AThread: TIdPeerThread);
        Log: TIdLogFile;
        Log := TIdLogFile.Create(AThread.Connection);
        Log.FileName := 'the desired filename';
        AThread.Connection.Intercept := Log;



In response to

How to use IdLog Components posted by Stefan Bartos on Wed, 17 Mar 2004