Sign in Join
FPDoc Onlineexperiment

TLazLoggerFileHandleThreadSave class

In unit LazLogger

Performs file operations using a critical section.

Declaration

pascal
TLazLoggerFileHandleThreadSave = class(TLazLoggerFileHandle)

Inheritance

  1. TLazLoggerFileHandleThreadSave
  2. TLazLoggerFileHandle

Description

TLazLoggerFileHandleThreadSave is a TLazLoggerFileHandle descendant which implements a threaded file logger. TLazLoggerFileHandleThreadSave uses a TRTLCriticalSection class instance to lock the log file during file output operations. Requires that DoOpenFile is called by the main application thread. Otherwise the filehandle may get closed.

Methods

CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
WriteToFilepublicRe-implements the method to use a critical section to protect write access to the handle for the class instance.
WriteLnToFilepublicRe-implements the method to use a critical section to protect write access to the handle for the class instance.

Inherited

From TLazLoggerFileHandle (10)

ActiveLogText CloseFile CloseLogFileBetweenWrites LastWriteFailed LogName OpenFile ResetWriteFailedCounter UseStdOut WriteFailedCount WriteTarget

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.