TsgcHTTP2ClientProperties › LogFile

LogFile Property

Persists inbound and outbound HTTP/2 frames to a file, useful for wire-level debugging.

Syntax

property LogFile: TsgcTCPLogFile read GetLogFile write SetLogFile;

Default Value

Enabled=False

Remarks

Set Enabled=True and FileName to the full path of the output log. Every byte sent or received on the HTTP/2 socket is appended to the file, so both request/response headers (HPACK-decoded in the component) and DATA frame payloads can be inspected. Access to the log file is not thread-safe, do not share the same file between several threads.

Example


oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;
oHTTP2.LogFile.FileName := 'C:\Logs\http2client.log';
oHTTP2.LogFile.Enabled := True;

Back to Properties