TsgcTCPClient › Properties › LogFile
Persists inbound and outbound socket traffic to a file, useful for debugging the wire protocol.
property LogFile: TsgcWSLogFile read GetLogFile write SetLogFile;
Enabled=False, Raw=False
Set Enabled=True and FileName to the full path of the output log. Every chunk sent or received on the raw TCP session is appended to the file. Raw stores the bytes in hexadecimal instead of plain text, which is useful when the payload is binary. Access to the log file is not thread-safe, do not share the same file between several threads.
oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.LogFile.FileName := 'C:\Logs\tcp.log';
oTCP.LogFile.Enabled := true;
oTCP.Active := true;