TLazLoggerFileHandle.OpenFile procedure
Opens the output handle for the logger when CloseLogFileBetweenWrites is False.
Declaration
procedure OpenFileDescription
Calls a private method to ensure that a Text handle is allocated for the output destination. No actions are performed when:
- ActiveLogText has already been assigned.
- Previous access to the output handle has failed.
- LogName is an empty string ('') and UseStdOut is set to False.
To use an output file, set LogName to a valid file path and name which allows write access prior to calling OpenFile.
To use the stdout device, set LogName to an empty string and UseStdOut to True prior to calling OpenFile.
RTL routines like Assign, Append, or Rewrite are called to associate the Text handle for the logger and to establish the FileMode for write access. On successful completion of the method, ActiveLogText is updated with the TextRec for the file name or stdout device in Output. If an exception occurs, it is caught and an error message is written to the stdout device.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
