-
Notifications
You must be signed in to change notification settings - Fork 10
jachLogVariable
Unit: ujachLogMgr
This global variable is declared in the unit ujachLogMgr and is intended to simplify the integration of the library with your project. Use this variable if you plan to have a unique log object in your application (like 99% of applications).
If you want this object to be auto-created and auto-configured, evaluate using the ujachLogAuto on your project and at runtime the variable will point to an auto-created TjachLog instance.
If you want to manually create and configure the object, make sure you initialize it before any usage. The recommendation is to create it on a unit initialization section, so it become available before the first line of your project gets executed. Make sure this unit is included as soon as possible in the project's uses clause to make sure it is created before any usage attempt.
If you want to see how it is done, take a look at the initialization section of the ujachLogAuto unit.
You can use this global variable to add log entries in your program, by invoking its log
methods. Take a look at the Simplest log example.
This global instance is auto-freed on the finalization section of the ujachLogMgr unit. If you manually free the instance, make sure you set the reference to nil
(for example calling FreeAndNil(jachLog)
), otherwise your program may end with an Access Violation or similar error.
jump to: get started — multiple log destinations — units and classes — wiki home — blog (English) — blog (Spanish) — library home