- Home /
Standalone save output_log
I would like to know if it is possible to save the output_log or maybe to save the log to a different location.
I want to use a different file at each game instance. Is it possible ?
Answer by Chris_Dlala · Sep 26, 2014 at 10:04 PM
Hi, I'm not aware of a way of doing this. As a workaround, maybe you could register to the application events and create your own version of the output, but I'm not sure if you get all the same information. Other than that, maybe create a launcher that checks for the output file and renames/moves it before running the game's executable. I'm not sure if that helps =P
Thank you for your answer, I think that the best idea is to create a launcher but how ?
I'm not sure exactly how to make it cross-platform, but all you need is a simple program to run your executable with -logFile argument passed in (Thanks to @Adpist for that info). A simple C# console program should get you started but you may want to ask a new question to increase your chances of getting valuable info.
Answer by Adpist · Oct 03, 2014 at 12:40 PM
Actually you can launch your exe with the -logFile parameter. you can provide a path and a specific log name. Not the best (having problems with this param as you can check here : http://answers.unity3d.com/questions/797592/-logfile-argument-with-special-characters.html)
something like "-logFile ./logs/log_date.txt". Absolute and relative paths both works.
Hope it helps !
/Adpist
I did not know that was an app argument - though it makes sense. So a launcher could check for log files and increment or pass in the date/time when running the game. Good find ;)
Your answer
Follow this Question
Related Questions
Health value isn't subtracting correctly 1 Answer
Can I see debug log(ex:printf) from C++ dll in Unity? 0 Answers
Less verbose Debug.Log ( Xcode ) 0 Answers
Same output_log.txt file being written to by multiple clients at once? 0 Answers
Debug.log output is not showing in device console for ios6 1 Answer