Search Unity

Question Player.log not being written on builds built from Xcode

Discussion in 'macOS' started by yuli_volta, Mar 26, 2021.

  1. yuli_volta

    yuli_volta

    Joined:
    Mar 22, 2021
    Posts:
    15
    Using:
    • Unity 2020.3.1f1
    • Big Sur 11.2.3
    • 2015 MBP, so Intel - not M1
    • Xcode 12.3
    I'm not seeing any Player.log files being written when building the app from Xcode (which I'm having to do because of entitlement issues...

    Player.log does get written just fine if I build the app directly from Unity, though...

    Anyone else currently finding this?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    That's weird... What path are you looking for it in? Did you try using -logfile command line argument to redirect it to a different place to see if there's anything interesting in it?
     
    yuli_volta likes this.
  3. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    I've been having the same issues locating the log files for mac builds since Catalina. The issue is that it now depends on where you run the app from as to where macOS puts the logs and many of the locations do not show up in Finder searches. For example the standard log locations are not used if you run your development app from the desktop. Try this:

    • in terminal find the process id of your application using:
    ps -ae|grep APP_NAME // case sensitive

    • look for the log file asssociated with your application and note the PID number and run:
    lsof -p 36597|grep log // replacing 36597 with the PID you found

    this should show the location of the log file you're looking for
     
    sonnyb and yuli_volta like this.
  4. yuli_volta

    yuli_volta

    Joined:
    Mar 22, 2021
    Posts:
    15
    @Tautvydas-Zilys I was looking in the usual location of
    Library/Logs/[companyName]/[appName]


    @jason_yak you're absolutely right - there they are. Thanks so much!

    In my case they were in
    Library/Containers/[appName]/Data/Library/Logs/[companyName]/[appName]
     
    sonnyb and jason_yak like this.
  5. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    531
    No worries, this little problem had me stumped for a while. Very handy way to track down the logs!
     
    yuli_volta likes this.