TsgcWebSocketServer_HTTPAPI › Properties › LogFile
Writes every incoming and outgoing socket message to a log file for debugging and auditing.
public TsgcWSLogFile LogFile { get; set; }
Enabled=False, UnMaskFrames=True
Set LogFile.Enabled to True and LogFile.FileName to the full path of the log file; every message received and sent over the socket 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 = new TsgcWebSocketServer_HTTPAPI();
oServer.LogFile.FileName = "c:\\logs\\server.log";
oServer.LogFile.Enabled = true;
oServer.Active = true;