TsgcHTTPServer › Properties › LogFile
Writes every incoming and outgoing HTTP request and response to a log file for debugging and auditing.
property LogFile: TsgcWSLogFile read GetLogFile write SetLogFile;
Enabled=False, UnMaskFrames=True
Set LogFile.Enabled to True and LogFile.FileName to the full path of the log file; every HTTP request received and response sent is then appended to the file, which is invaluable during development or production troubleshooting. UnMaskFrames (default True) stores the payload unmasked for easier inspection. The file is opened on demand and closed on each write; avoid enabling the log on production servers under heavy load as disk I/O will become a bottleneck.
oServer := TsgcHTTPServer.Create(nil);
oServer.LogFile.FileName := 'c:\logs\server.log';
oServer.LogFile.Enabled := true;
oServer.Active := true;