TsgcQUICClient › Properties › LogFile

LogFile Property

Writes the raw UDP datagrams exchanged with the QUIC server to a text file for debugging.

Type

TsgcUDPLogFile

Syntax

property LogFile: TsgcUDPLogFile read FLogFile write SetLogFile;

Default

Disabled (Enabled = False, FileName empty).

Sub-Properties

NameTypeDefaultDescription
EnabledBooleanFalseTurns logging on. The log is only attached to the connection when this is True and FileName is not empty.
FileNameStringemptyFull path of the file the datagrams are written to. An empty name disables logging even when Enabled is True.

Remarks

LogFile records the datagrams that travel over the UDP socket underneath the QUIC connection. Both conditions are checked when the connection is created, so set Enabled and FileName before opening the connection, changing them on a live connection has no effect.

What lands in the file is the encrypted QUIC wire image, not your application payload: QUIC encrypts almost the whole packet, including most of the header, so the log is useful for confirming that datagrams flow in both directions and for sizing them, not for reading message content. To inspect payloads, log them yourself from OnQUICStreamData or before calling WriteData.

This member is currently available in the Delphi/C++Builder implementation only.

Example


oClient := TsgcQUICClient.Create(nil);
oClient.Host := 'www.example.com';
oClient.Port := 443;

oClient.LogFile.FileName := 'C:\logs\quic.log';
oClient.LogFile.Enabled := True;

oClient.Connect;

Back to Properties