Skip to content

ujachLogAuto

Juan Antonio Castillo edited this page Feb 23, 2022 · 3 revisions

Make it simple, use the ujachLogAuto unit

By using the ujachLogAuto unit, you avoid manually creating and configuring the main log object and standard log destinations.

This unit make it for you by:

  • Declaring a global variable named jachLog, which at runtime points to an auto-created TjachLog instance. By default, this instance is configured to immediately write the log messages to destinations
  • Creating a destination to Disk, which will be written to the default folder (c:\ProgramData\log in Windows).
  • If the program is of type console, also a Console destination is automatically created, so everything you write to the log will be immediately reflected to the console output of your program.

The unit provides the functions:

So you can get access to the LogWriter objects to change it's default configuration. Be careful and make the configuration changes in the main thread and before any log output is written for consistency.