[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'LazLogger' (#lazutils)

TLazLoggerFileHandleThreadSave

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Performs file operations using a critical section.

Declaration

Source position: lazlogger.pas line 78

type TLazLoggerFileHandleThreadSave = class(TLazLoggerFileHandle)

public

  constructor Create;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure WriteToFile(); override;

  

Re-implements the method to use a critical section to protect write access to the handle for the class instance.

  procedure WriteLnToFile(); override;

  

Re-implements the method to use a critical section to protect write access to the handle for the class instance.

end;

Inheritance

TLazLoggerFileHandleThreadSave

  

Performs file operations using a critical section.

|

TLazLoggerFileHandle

  

Represents a file or device handle for a logger class instance.

|

TObject

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.