Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

About Player Log

Discussion in 'Editor & General Support' started by jo82, Jul 16, 2019.

  1. jo82

    jo82

    Joined:
    Dec 3, 2015
    Posts:
    17
    Hi,

    Unity 2019.1.10f1 user here.

    I was wondering why's the Player Log file still created when I publish my game even though it's unchecked in the players settings.

    When I try the game in the standalone player I get all my debug.logs in the Player.log file situated in C:\Users\me\AppData\LocalLow\DefaultCompany\MyGame

    Doesn't this have an effect in the game performance if all the logs get written while playing?

    Thanks
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,872
    Debug.Log calls are surprisingly costly. You should disable any which happen on a regular basis in a released build. Limit your use to important information if you should actually need to view the log file, or error reporting.
     
    Last edited: Jul 16, 2019
  3. jo82

    jo82

    Joined:
    Dec 3, 2015
    Posts:
    17
    Hi, Joe-Censored,

    Thanks for the reply but do you have any idea why it's still being created even if I unchecked "use player log" in project settings?

    I mean if you check or uncheck this option it still create the file so I guess the option is useless in the end.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,872
    Hopefully someone else can help, as I've never actually disabled it.
     
  5. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    23
    Noticed this in 2019.10 also, Player.log is being created despite the option being switched off. I'll try to submit it as a bug.
     
    Joe-Censored likes this.
  6. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,634
    Funny up until now i thought the "use player log" meant that the engine does not stops the debug.logs to write into the file (but the time consuming C#->C++ transfer still paid, this is why I'm advocating the removal of the Debug.Logs from the code physically, although the info is scarce on this, I may be wrong) and the other log options can also write into the log file independently https://docs.unity3d.com/Manual/class-PlayerSettingsStandalone.html#Logging
    Apparently I was wrong?
     
    Joe-Censored likes this.
  7. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    23
    Removal through code is good, recommended even. However, Unity itself writes debug info at the start: DirectX stuff etc. which is written even before I can intercept it to stop logging.

    The option is to not write a file and that is broken in recent Unity versions. I hope they fix it soon.
     
  8. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    23
    I've submitted a bug and Unity have said it is plan to fix in 2019.3.
     
  9. amateurd

    amateurd

    Joined:
    Nov 1, 2016
    Posts:
    23
    I understand it's fixed in 2019.2 and 2019.3 but they won't be applying a fix for 2019.1.