开发者

how to log the wow network latency in to a file

开发者 https://www.devze.com 2023-03-16 11:04 出处:网络
I want log the wow network latency in to a file ,like c:/wowlatency.txt now ,I can use some lua stript to log it开发者_Python百科 into wow\'s chat log file.but I want log it to my own log file .can d

I want log the wow network latency in to a file ,like c:/wowlatency.txt

now ,I can use some lua stript to log it开发者_Python百科 into wow's chat log file.but I want log it to my own log file .can do this ?


If you already have the infrastructure in place to monitor the latency (ie. calling GetNetStats every 30 seconds), you can use Lua's built in File I/O facilities to open the desired log file:

local latencylog = io.open("c:/wowlatency.txt","w")

-- enter whatever loop you may have
  latencylog:write(message_string_about_latency)
  -- don't forget to write a \n if it's not in the string
  -- repeat

-- after finishing the log
latencylog:close()
0

精彩评论

暂无评论...
验证码 换一张
取 消