[lazarus] Debug class
Jeffrey A. Wormsley
daworm at cdc.net
Mon Jul 5 19:36:09 EDT 1999
Since I am going to stick mainly to Win32 until I get RH6 up, and where I
know my way around a bit better, I would veru much like this, as writing to
the console in a window slows things down terribly.
Jeff.
*********** REPLY PARTITION ***********
On 7/5/99, at 7:21 PM, Michael A. Hess wrote:
>Greetings,
>
>I have also created a Debug class for use in a FCL based project.
>
>It is a class called TDebug.
>
>It has the following methods:
>
> Write(message : string);
>
>and the following properties:
>
> LogFile : String
> DebugOn : Boolean
>
>It is a simple thing to use. All you have to do is include it in the
>file that you want to have debug output. It is does a self setup so you
>don't have to creat anything.
>
>Just add udebug to your uses clause.
>
>Then set
>
> Debug.DebugOn := True;
>
>and from then on anything that calls
>
> Debug.Write('your message');
>
>will get output.
>
>If you don't specify a LogFile then all out put goes to the console. If
>you do specify a LogFile:
>
> Debug.LogFile := 'project.log';
>
>Then all output goes to the file projects.log. This way you can easily
>use it for console output during development and for an error log in the
>actual program.
>
>When you don't want any of the output just don't set DebugOn to True. It
>is a lot cleaner then a whole lot of #ifdefs.
>
>OK. Any want it?
>--
>==== Programming my first best destiny! ====
>
>Michael A. Hess Miracle Concepts, Inc.
>mhess at miraclec.com http://www.miraclec.com
>
>_________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
>
More information about the Lazarus
mailing list