TsgcUDPCLientProperties › LogFile

LogFile Property

Writes every datagram sent and received to a plain-text log file for diagnostics.

Syntax

property LogFile: TsgcUDPLogFile read FLogFile write SetLogFile;

Default Value

Remarks

Set Enabled := True and supply FileName with the full path of the log file; every datagram exchanged by the client is appended with a timestamp and direction marker. This is intended for debugging only: file I/O is serialized per-message and is not thread safe when the same file is shared across multiple components, and continuous logging of high-volume UDP traffic can impact throughput. Disable the log file in production builds.

Example

oClient.LogFile.Enabled := True;
oClient.LogFile.FileName := 'C:\logs\udp-client.log';

Back to Properties