TsgcSTUNClient › 属性 › LogFile
将发送或接收的每条 STUN 消息保存到文件中以便调试。
property LogFile: TsgcSTUNLogFile read FLogFile write SetLogFile;
—
当 Enabled 为 True 时,客户端发送和接收的每条 STUN 消息都将追加到 FileName。这是一个调试辅助工具;当同一日志在多个线程或组件之间共享时,对文件的访问不是线程安全的。
oSTUN.LogFile.Enabled := True;
oSTUN.LogFile.FileName := 'C:\logs\stun_client.log';
oSTUN.SendRequest;