[lazarus] Debug class

Shane Miller smiller at lakefield.net
Mon Jul 5 22:06:11 EDT 1999


I'll take it and include it with Lazarus for now.

Shane

-----Original Message-----
From: Michael A. Hess <mhess at miraclec.com>
To: Lazarus-List <lazarus at miraclec.com>
Date: Monday, July 05, 1999 4:35 PM
Subject: [lazarus] Debug class


>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