mike123456 Posted July 22, 2020 Share Posted July 22, 2020 I'm working on a server side mod that records detailed info about the game state for later analysis. How can I write game state information to a log file somewhere on the server? I haven't found it in any of the tutorials or mod examples I've looked at but figured some devs here might know how Link to comment https://forums.kleientertainment.com/forums/topic/120330-writing-to-log-files/ Share on other sites More sharing options...
Wonderlarr Posted July 23, 2020 Share Posted July 23, 2020 If you want to print stuff to "server_log.txt" then you can use print("text") or print(variable) Link to comment https://forums.kleientertainment.com/forums/topic/120330-writing-to-log-files/#findComment-1356786 Share on other sites More sharing options...
rawii22 Posted July 23, 2020 Share Posted July 23, 2020 (edited) You can then access it in C:\Users\user\Documents\Klei\DoNotStarveTogether\client_log.txt (I put a shortcut to this on my desktop since I use it all the time for the error traceback) If you're printing in a dedicated server or a world with caves, you might find something in C:\Users\user\Documents\Klei\DoNotStarveTogetherDedicated\Cluster_1\Master\server_log.txt Edited July 23, 2020 by rawii22 Link to comment https://forums.kleientertainment.com/forums/topic/120330-writing-to-log-files/#findComment-1356863 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now