Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never get unity logs #3

Open
RobinHSanner opened this issue Feb 1, 2018 · 7 comments
Open

Never get unity logs #3

RobinHSanner opened this issue Feb 1, 2018 · 7 comments

Comments

@RobinHSanner
Copy link

The code:
.withUnityLogger(message =>
{
log.debug(Unity: ${message});
console.log(Unity: ${message});
})
never gets hit. When unity does have a problem the error is always:
{"unityLog":""}

Lately for no apparent reason i'm getting the error that says unity crashed and the log file it says it created is always empty.

@RobinHSanner
Copy link
Author

RobinHSanner commented Feb 1, 2018

The problem can be simulated by using the erroneous: .withBuildOptions({ strict: true }) - should be strictMode.

In unity_invoker.js if I modify the function toArgv with:

    else if (key === 'logFile') {
        argv.push('c:\\temp\\unity.log');
    }

then I get a log. by default the logFile property is set to true and so nothing gets pushed after it but according to https://docs.unity3d.com/Manual/CommandLineArguments.html -logFile needs a filename after it.

@toverux
Copy link
Contributor

toverux commented Feb 2, 2018

Hello @RobinHSanner, thanks for the report!

What version of Unity do you use? I suspect 2017.x since this used to work before.

Yes, -logFile without argument seems counter-intuitive, but this is how you were specifying to Unity to not use a log file and send back the log in real time to stdout. Then we we were watching stdout and writing our own log file in case of problem.

I will check if the behaviour has effectively changed in Unity 2017, try to reproduce and fix the problem (implementing a different behaviour based on the version of Unity) and I'll keep you informed.

@toverux
Copy link
Contributor

toverux commented Feb 2, 2018

Hello again,

I can't reproduce with Unity 5.x, nor with Unity 2017.x.

Also, what's your OS? Compatibility with Windows is mostly untested, and I wouldn't be surprised if this specific point about logfile/stdout has a different behaviour on Windows.

@RobinHSanner
Copy link
Author

RobinHSanner commented Feb 2, 2018

Unity 2017.3.0f3
Windows 10

@toverux
Copy link
Contributor

toverux commented Feb 2, 2018

Okay, must be a Windows-specific problem.

(@fklingler @CrazyTales Wanna fix Windows-ish things?)

@RobinHSanner
Copy link
Author

RobinHSanner commented Feb 2, 2018 via email

@toverux
Copy link
Contributor

toverux commented Sep 13, 2018

So that's a problem on Windows indeed: https://answers.unity.com/questions/19566/command-line-feedback.html
One of our teammate on Win had the same problem as you.
Unless someone proposes a workaround it'll stay a wontfix, better wait a proper fix from Unity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants