TsgcWebSocketLoadBalancerServerProperties › LogFile

LogFile Property

Writes every socket message handled by the load balancer to a log file for debugging and auditing.

Syntax

property LogFile: TsgcWSLogFile read GetLogFile write SetLogFile;

Default Value

Enabled=False, UnMaskFrames=True

Remarks

Set LogFile.Enabled to True and LogFile.FileName to the full path of the log file; every frame received from and sent to downstream clients and backend servers is then appended to the file. This is useful when debugging backend registration, binding advertisement, or message relay across the load balancer. 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 in production under heavy load because disk I/O will become a bottleneck on the fan-out path.

Example


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.LogFile.FileName := 'c:\logs\lbserver.log';
oServer.LogFile.Enabled := true;
oServer.Active := true;

Back to Properties