TsgcSTUNServerProperties › LogFile

LogFile Property

Appends every STUN message received or sent by the server to a file for debugging.

Syntax

property LogFile: TsgcSTUNLogFile read FLogFile write SetLogFile;

Default Value

Remarks

When Enabled is True every Binding Request received and every Binding Response or Error sent by the server is appended to FileName. This is a debugging aid only; file access is not thread-safe when the same log is shared across multiple components. For a busy server, disable the log in production to avoid contention on the file handle.

Example

oSTUN.LogFile.Enabled := True;
oSTUN.LogFile.FileName := 'C:\logs\stun_server.log';
oSTUN.Active := True;

Back to Properties