Search Issue Tracker

Fixed in 2019.1.X

Votes

29

Found in

5.6.0f3

Issue ID

900754

Regression

No

Command line -logFile with no parameters outputs to screen on OS X but not on Windows

Windows

-

Steps to reproduce:
1. Find attached project in command line Windows
2. Launch Unity with parameters -batchmode -quit -logFile
3. Notice that in -logFile we didn't input any path for the log file to be saved
4. Observe nothing being output
5. Repeat process in terminal on Mac OS
6. Observe logFile being output to terminal

Expected behaviour: The command should function the same on both Mac OS and Windows
Actual behaviour: No output in Windows, while Mac OS outputs the logFile to the terminal

Reproduces on 2017.1.0b1, 5.6.0f3, 5.6.0f2, 5.5.3p1

Notes: This behaviour is likely due to no handlers existing for -logFile command with no parameters.
Notes: The output is written in Windows, but it defaults to a location that the user probably doesn't expect: %LOCALAPPDATA%\Unity\Editor.

  1. Juixa

    Sep 28, 2018

    Hey, here is a response from dev team:
    "It has been on our radar for quite some time. Unfortunately the current situation with priorities is such that we might not have the bandwidth to address this issue until at least 19.1+."

  1. Resolution Note (fix version 2019.1):

    Logging now defaults to stdout on all platforms when running in batchmode. Note that on Windows, this still means output won't go to console by default as Windows applications don't have stdout handle by default. Output will, however, go to stdout if you launch Unity with a valid stdout handle. I.e. launching as a child process of a build system with redirected handles

Comments (34)

  1. unity_K99WJS2TxGpRtA

    Apr 05, 2020 16:24

    Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,
    Rèm văn phòng http://www.mappery.com/user.php?name=thegioiremxx

  2. InfiniBuzz

    Dec 01, 2019 17:21

    For those still having problems with this: I found that since 2019.1 the documentation for the -logFile option states:
    "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."

    So I am getting stdout on console on windows withOUT -nographics option using
    "-logFile -" in the options list.
    To clarify again: You must explicitly specify the "-" as the logfile on windows.

  3. DrummerB

    Nov 26, 2019 16:03

    This is still not fixed. I may be missing something, but currently, it seems like you have to pick between not having any output (i.e. not having any feedback what went wrong in your build pipeline) or not having access to the GPU. Compiling compute shaders fails with the -nographics option.

  4. NickWinters

    Sep 30, 2019 15:31

    I'm using 2019.2.6f1 and it's still broken.

  5. unity_bXP-JIUSECJnhg

    Sep 21, 2019 10:58

    I'd argue that this isn't fixed yet. not being able to have logs in CI environments when you have GPU rendering to do makes this still an issue.

  6. Sam0waR

    Aug 20, 2019 20:42

    Looks like it is broken again in 2019.2.0 - there is no log on stdout in batch mode and no graphics.

  7. dzamani

    May 15, 2019 14:25

    Like DRUMMERB said, it's not fixed unless you add the -nographics option on 19.1.1f1.

  8. DrummerB

    May 03, 2019 16:33

    Indeed, with 2019.1 it seems to work, but only with the -nographics option, which is unfortunate e.g. if you need the GPU for lightmap generation

  9. dtretyakov

    Feb 13, 2019 12:39

    Is it expected that Unity Editor 2019.1 launched on Windows with `-logFile` without file path argument writes log into stdout only with `-nographics` argument?

  10. watsonsong

    Oct 11, 2018 01:46

    This is really make the CI system hard to detect whether the unity is alive.
    I hope it could be fix in 2018

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.