TidSmtp debug log

I am migrating an application from the old TurboPower InternetPro suite
to Rad Studio 2007 and Indy.  The old TurboPower SMTP component had the
ability to write a 'debug' log which was effectively a trace of all
traffic  sent and received over the connection.  Is there a way to do
something similar using Indy?
0
Stephen
8/29/2008 1:09:29 PM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

5 Replies
1375 Views

Similar Articles

[PageSpeed] 36

<Stephen Boyd> wrote in message news:8304@forums.codegear.com...

> Is there a way to do something similar using Indy?

Indy has TIdLog... components for that purpose, such as TIdLogFile.  Simply 
attach one to the TIdSMTP's Intercept property before connecting to the 
server.

-- 
Remy Lebeau (TeamB)
0
Remy
8/29/2008 6:21:12 PM
Remy Lebeau (TeamB) wrote:
> <Stephen Boyd> wrote in message news:8304@forums.codegear.com...
> 
>> Is there a way to do something similar using Indy?
> 
> Indy has TIdLog... components for that purpose, such as TIdLogFile.  Simply 
> attach one to the TIdSMTP's Intercept property before connecting to the 
> server.
> 

The problem is that TIdSmtp doesn't have an intercept property.  At 
least not that I can find documented.  I had to add the TIdLogFile to 
the Socket's Intercept property which I couldn't do until after I had 
started the connection process.
0
Stephen
8/29/2008 7:37:27 PM
"Stephen Boyd" <steve.boyd@amtelecom.net> wrote in message 
news:8528@forums.codegear.com...

> The problem is that TIdSmtp doesn't have an intercept property.

If you are using an earlier build of Indy 10, you have to attach a separate 
TIdIOHandlerStack component to the TIdSMTP, as Intercept is a property of 
TIdIOHandler.  In Indy 9, Intercept was a property of TIdTCPConnection 
instead, so every socket component had it available.  When things were moved 
to TIdIOHandler in Indy 10, that functionality was lost.  A delegating 
Intercept property was re-added back to TIdTCPConnection in a later build of 
Indy 10.

> I had to add the TIdLogFile to the Socket's Intercept property which
> I couldn't do until after I had started the connection process.

If you do not have an IOHandler assigned before calling Connect(), it will 
create one internally for you.  This is fine for most situations.  However, 
in this particular stuation, simply assign your own IOHandler beforehand, 
and then you can hook up the Intercept before calling Connect().


Gambit
0
Remy
8/29/2008 8:00:40 PM
That worked well thank you.

Now is there some way to have it not open the log file for exclusive 
use.  It would be nice to be able to look at the file while the 
application was running.

I can't open it with notepad and copying the file to another directory 
to get around the lock doesn't work either.
0
Stephen
8/29/2008 8:50:53 PM
"Stephen Boyd" <steve.boyd@amtelecom.net> wrote in message 
news:8552@forums.codegear.com...

> Now is there some way to have it not open the log file
> for exclusive use.

Create a blank file beforehand.  When TIdLogFile is activated, it opens an 
existing file with read sharing allowed.

Otherwise, use TIdLogEvent instead, and write the log data to your own file.


Gambit
0
Remy
8/29/2008 9:32:20 PM
Reply:

Similar Artilces:

Debugging DLL compiled with Delphi 7 in Delphi XE5
Dear Sirs/Madams, We are considering changing from Delphi 7 to Delphi XE5. Our project consists of a dll and an .exe file. I have begun converting the .exe file to Delphi XE5 and have successfully accessed the DLL compiled with Delphi 7. When I debug the DLL (using the "run parameters" and changing "host application" to the .exe file) in Delphi 7 I can set breakpoints etc. and they are triggered. However, when I attempt to debug the project in XE5, I get the following message: Module Load: xxx.dll. No Debug Info. Base Address: $015A0000. Process xxx.exe (2928) ...

Logging log
Hi! I try to accomplish task described in http://forums.novell.com/novell-product-support-forums/zenworks/configuration-management/zcm-server-install/422609-mixed-login.html?pagenumber= and wonder I don't know how to keep log of logging? I mean, does ZCM is capable to keep logging log? As Altiris NS does? More thanks, Alar. -- NovAlf ------------------------------------------------------------------------ You look like you want to log in to your zone as a user from either a eDIR or AD. And yes this is possible, it will search both Directories. http://www.theurbanp...

Debug Log
I can't seem to get the Debug Log to display anything; I set up its options and have it open when my program is running, but when the program exits the Debug Log is still empty. I know you need some sort of network support; I have Dial-Up networking installed (Win95), and I know the Debug Log used to work for me, but for some reason it doesn't do anything now. Any ideas? Bill Klein <bk@cheerful.com> - http://bk.base.org/ "Extraordinary claims require extraordinary evidence." -David Hume I've found that the d...

Logged In As: Not Logged In
I installed ZCF 10.0.1 on a Win 2K3 server and when I install the ZEN client on a workstation the ZENWORKS client login comes up and I cannot log into it. It shows me the realm name of my tree and Zenworks Zone and I have tried both to no avail. When I look at the details of the adaptive agent it says, "Logged In As: Not Logged In" Any ideas? On Fri, 11 Jan 2008 14:55:21 GMT, Jayson E. Hahn wrote: > Any ideas? Debug logs in ZCM http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=3418069&sliceId=SAL_Public&dialogID=51010132...

To log or not to log
Hello foremen, on a large database, trillions of SELECTs and DELETEs are going to be performed. After that, the database is going to be unloaded. The database uses a transaction log. Should I keep the log there along this process or "unmount" it after some parts of it (or even before the beginning)? In this case, nothing but the speed is important. The database is ASA 7.0.4.3498. Thanks Pavel LOG... ALWAYS LOG. Performance is dependent on the use of the log. Recommendations: 1) Ensure that the file system is not excessively fragmented 2) Host the db f...

debug log
I'm trying to implement Sun's Message Queue with ASA 9.0.2. Sun Message Queue is dying while doing an insert. Is there an option I can set in Sybase that will show the the attempted SQL in some sort of log? I think the problem has something to do the jdbc driver and having a log would help to narrow it down. I translated the transaction log, but that did not show anything. Preston The "request level log" is what you want. To start it, from dbisql... CALL sa_server_option('Request_level_log_file','C:\\temp\\rlog.txt' ); CALL sa_serv...

Debugging in Delphi XE2 using another Delphi BDS process as host
Hi I've been using delphi a long time And I always had the possibility of debbuging Packages using another Delphi process as host. This is very useful to test the design-time side of packages. Now with XE 2 I can whether running with options - Debugger - Host Application or Attach to process Any ideas? Thanks Plp Pedro wrote: > Now with XE 2 I can whether running with options - Debugger - Host > Application or Attach to process What exactly are you having trouble with? Error messages, unexpected behavior, etc. -- Remy Lebeau (TeamB) Hi Remy ...

Delphi 2010: AV when switching from Default to debug layout and when closing Delphi
Hello, I experience strange AVs in rtl140.bpl when switching from the Default to the Debug Layout (e.g. when starting the application) or when closing Delphi 2010. I have a bunch of Addins (Modelmaker Code Explorer, EurekaLog, DDevExtensions, JCL, etc...), components installed. Any ideas/tools to possibly track down where the culprit is? Possibly simply an addin in combination with docked windows etc. Thanks, Thomas > {quote:title=Thomas Steinmaurer wrote:}{quote} > I experience strange AVs in rtl140.bpl when switching from the Default > to the Debug Layout (...

Is it posible to configure Delphi XE3 IDE to use Delphi 7 compiler/debuger
Hi! Like many other developer out there I have several project which has been developed with older version of Delphi (Delphi 7). Since theese projects rely on some components which are not compatible with newer versions of Delphi (no newer versions available) I'm forced to do any maintnance on theese projects using Delphi 7. Another solution would be to find replacment components which would provide me with same capabilities and work with latest versions of Delphi. But this would probbably require compleete rewritings of my projects (lots and lots of work). So currently I'm using...

No log output despite various debug prefs and app.update.log = true
I am trying to debug a failing update process on OSX but I don't get any de= cent log output indicating what's going wrong.=20 Added this prefs: /* debugging prefs */pref("browser.dom.window.dump.enabled", true); pref("javascript.options.showInConsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); pref("app.update.log", true); And running the app with "-jsconsole". But despite this, the app starts, th...

delphi debugging = luxury
Hi, Are we Delphi developers spoiled in terms of debugging? I'm reading the book "coders at work". The coders were asked how they debug. Most answered "print" statements. Other answered "reading the code until the bug was found". The coders use among others the following languages: Lisp, Haskel, JavaScript, Java, Perl ... Until the first Delphi version I used I always use the debugger. Make breakpoints, read the values of the variables, modify them, go step by step through the code and so on. I can't believe that Delphi is the only ide...

debug log / w_main
Is there any particular reason why pfc_w_debuglog and pfc_w_sqlspy are inherited from w_main instead of w_master? (in PFC 5.00.03 at least) If a developer modifies w_main, it tweeks the debuglog and sqlspy windows as well. Since there is no extra functionality in w_main, I do not understand why the pfc_w_debuglog and pfc_w_sqlspy don't inherit from w_master. It was my understanding that w_main was 'reserved' as the main window for SDI applications... -Joe On Thu, 15 Jan 1998 12:15:42 -0800, joe dupre <dupre@avab.com> wrote: >Is there any particular reas...

interpreting debug log
in my debug log i get the following message: Memory warning: 2 unfreed allocations: 0083365c size 0x0008 (#476) from in ? line -1 008336b4 size 0c0008 (#485) from in ? line -1 i gather the (#476) is the allocation number (throughout the log there are different refernce numbers). i cannnot find either number in the log .. i gather the 0083365c is a memory location. any suggestions on finding out what is not being freed?? peter From my understanding, when you receive a line number of -1, this indicates a memory leak occurred in the Power++ framework. Possibly a somethi...

Firefox Debug Logs
Hello, Is there any way to output Debug messages from FireFox into a log file? Just as an exercise I tried set NSPR_LOG_MODULES=nsHttp:5 set NSPR_LOG_FILE=C:\FireFoxLog.txt ..\firefox.exe I also tried firefox -debug but nothing works. The file FireFoxLog.txt remains at size 0. Is there any documentation on the modules that NSPR_LOG_MODULES can take and the log level hierarchy? Thanks in advance. Best regards, B. On 17 Aug 2006 23:26:57 -0700, bilaribilari@yahoo.com wrote: >Hello, >Is there any way to output Debug messages from FireFox into a log file? > >...

Web resources about - TidSmtp debug log - embarcadero.delphi.winsock

Resources last updated: 12/6/2015 11:01:08 PM