THotLog |
[ Home ] |
Quickstart |
In order to make your life easier, the unit HotLog.pas declares an
instance of THotLog, and calls its constructor automatically, as soon
as your programm is loaded (in fact, as soon as the HotLog unit's part
of your programm is loaded).
This instance is called "hLog".
It is the object instance you'll use to access HotLog.pas/THotLog
properties and routines.
All the following examples will allways use it. However, and as stated
before, THotLog being an object, you can declare as many instances of
it as you want.
To use THotLog you will have to:
1. Extract / copy HotLog.pas into the directory of your
application.
2. Add "Hotlog" to the uses clauses
of your project file (.dpr for Delphi or .lpr for Lazarus) and of all
units that may use THotLog:
procedure TForm1.FormCreate(Sender: TObject); begin ... hLog.StartLogging; // THotLog's threads are now created and running. You can start logging data. ... end;Remember that you don't have to instanciate hLog (using its constructor, "Create"), because the instance hLog already exists.
hLog.Add(aString: String); //hLog.Add( ) overloaded procedures imply parsing. hLog.Add(aStringList: TStringList); hLog.Add(aConstArray : Array of Const); hLog.AddStr(aString: String); //hLog.AddStr( ) avoids parsing.
The next pages explain how to change some or all of the hLog default behaviour and values.
THotLog |