unitysetup.powershell icon indicating copy to clipboard operation
unitysetup.powershell copied to clipboard

Specifying -LogFile for output to the console

Open StephenHodgson opened this issue 6 years ago • 2 comments

Currently this script assumes that a path is required for the -logFile parameter. We can update it to support getting console output.

https://docs.unity3d.com/Manual/CommandLineArguments.html:

Specify where Unity writes the Editor or Windows/Linux/OSX standalone log file. To output to the console, specify - for the path name. On Windows, specify - option to ensure output goes to stdout, which is not the console by default.

StephenHodgson avatar Apr 26 '19 19:04 StephenHodgson

Does this work correctly with batch mode?

Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information.

redwyre avatar Jul 01 '20 13:07 redwyre

Batch mode is typically used for any automated building, and so far, yes in my versions it works correctly. You still have full control over how logs are displayed and their logging types can be modified by utilizing scripts that can change it if specific conditions using LogErrorFormat. The only thing batch mode really changes is how dialogs are handled.

StephenHodgson avatar Jul 01 '20 20:07 StephenHodgson