Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Debug.unityLogger.logEnabled = false & Cloud Diagnostics

Discussion in 'Unity Cloud Diagnostics' started by Apollo-Meijer, Mar 3, 2020.

  1. Apollo-Meijer

    Apollo-Meijer

    Joined:
    Mar 30, 2015
    Posts:
    31
    Hey!

    To avoid getting any logs enabled in my release builds, I disable logs like this
    Debug.unityLogger.logEnabled = false


    Now my problem is that I can not log any events that are captured in Cloud Diagnostics.

    How can I work around this? We have a lot of crashes in cloud diagnostics and we have no leads, with firebase we can leave specific bread crumbs
     
  2. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Apollo-Meijer, is there any particular reason that you're specifically disabling logging in your release builds? Was it performance-related or some other reason?
     
  3. Apollo-Meijer

    Apollo-Meijer

    Joined:
    Mar 30, 2015
    Posts:
    31
    We do it for performance reasons
     
  4. Apollo-Meijer

    Apollo-Meijer

    Joined:
    Mar 30, 2015
    Posts:
    31
    We disable the logs because we noticed that It creates a lot of garbage and deep profiling usually just gets stuck when we have logs enabled.

    When we monitor a development build with logs enabled the performance is terrible.
    Do you have any suggestions on how we can monitor the impact of our logs with a release build?
     
  5. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Thank you for the additional information. In this case, you should still be able to make use of the metadata that's included in the reports. Beyond that, I'm afraid I'm not sure if there are any other options while logging is disabled. I hope that this info helps and let me know if you have anymore questions.
     
  6. SandeepNsk_SpiritualGamer

    SandeepNsk_SpiritualGamer

    Joined:
    Mar 21, 2020
    Posts:
    7
    so, if we have
    Code (CSharp):
    1. Debug.unityLogger.logEnabled = false;
    then any fatal/non fatal exceptions wont be reported to Unity CD. This is really disappointing