Search Issue Tracker

Fixed in 2019.1

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. Response avatar

    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. Response avatar

    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 (8)

  1. Eabfe97471493a4c114d5f638cc0dd31?d=mm

    dzamani

    May 15, 2019 14:25

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

  2. 482cfff1c21068a8f1846c9e632908b9?d=mm

    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

  3. C505a15e32fe2bb7860dccd7290d6663?d=mm

    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?

  4. 2baeca49f28fcbbea2e24a2796cc8e57?d=mm

    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

  5. 5a679ffba227ed9d30b560872669d768?d=mm

    thoudayer

    Sep 27, 2018 15:11

    Issue created on April 2017 and no fix yet ! Is there a possibility this will be fixed in your latest version (2018.2) at least.
    Jenkins CI compilations under Windows are not very handy without output. We have a workaround which is not very effective.
    Can you at least give us an ETA ?

  6. Fc071b72ef5d3e43bccb144caf963fb5?d=mm

    Deepscorn

    Aug 18, 2018 18:11

    Issue reproduces in Unity 2017.1.7f1 in windows 10.
    1. Using -logFile <file> works,
    2. using -logFile with nothing provided - outputs nothing to cmd,
    3. using -logFile CON - same result as (2)

  7. 7112a67d9e1523ad3927c81364292939?d=mm

    NLaniel

    Aug 15, 2018 13:41

    Has this been fixed by not outputting anything on Mac OS?
    Using 2018.2 on Windows and I do not get any output.

  8. 99190836fd2cc2604b23d8b48fc497a1?d=mm

    hstefan1

    Jul 27, 2017 22:46

    This makes some CI setups more complicated than they needed to be, as we have to either read the entire file at once or somehow monitor the logFile path with a separate command/application.

All about bugs

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