TsgcUDPServerProperties › LogFile

LogFile Property

Writes every datagram received and sent by the server 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 with any peer 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 measurably reduce throughput. Disable the log file in production builds. When DTLS is active the log records decrypted plaintext on the read path and cleartext on the write path, never raw ciphertext.

Example

oServer.LogFile.Enabled := True;
oServer.LogFile.FileName := 'C:\logs\udp-server.log';

Back to Properties