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()
精彩评论