Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing to the Event Log in Delphi

Tags:

delphi

How can I get an application to write debug text to the Event Log window in the Delphi IDE (Borland Developer Studio 2006)?

How does one change the color of the text?

like image 413
Charles Faiga Avatar asked Dec 29 '08 15:12

Charles Faiga


1 Answers

OutputDebugString('Hello,World');

I think you may need to add Windows to your 'uses' list. Not 100% sure on that...

The text colour can't be changed as far as I know: It's a feature of the Delphi IDE that it adds additional messages into that window for thread start/stop, DLL load/unload, with their own specific colour.

like image 190
Roddy Avatar answered Sep 27 '22 21:09

Roddy