I want to write a script to upload logfiles with a bugreport. How do I find the logfile? (For production, so no editor logs.)
The documentation gives these paths:
- macOS ~/Library/Logs/Unity/Player.log
- Linux ~/.config/unity3d/CompanyName/ProductName/Player.log
- Windows Unity 5.6 EXECNAME_Data\output_log.txt
- Windows Unity 2017+ C:\Users\username\AppData\LocalLow\CompanyName\ProductName\output_log.txt
How do I translate these paths into code?
CommandLineArguments docs has an entry for a -logFile
option:
Specify where the Editor or Windows/Linux/OSX standalone log file are written.
If that’s used, is there a way to get a path to the log file?