Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Log without an unhandled exception?

Discussion in 'Unity Cloud Diagnostics' started by drewdough, Nov 10, 2018.

  1. drewdough

    drewdough

    Joined:
    Oct 5, 2016
    Posts:
    49
    hi,

    Is it possible to send logs without an unhandled exception occuring?
    For example, I'd like to write debug, warning, and error logs but still handle all the exceptions gracefully.
    Is this possible at all, even with paid version of Diagnostics?

    From what I can tell, this product only supports unhandled exceptions, and if paid, the 50 debug logs leading up to the crash - but I can't just arbitrarily Log things unless an unhandled exception occurs?

    Seems incomplete as many things can go wrong without the app crashing. I wonder if this is on the road map or if I should look into using Loggly service instead?

    Thank you for your help.
     
  2. johng_unity

    johng_unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    158
    You can report anything by calling Debug.LogException

    This is probably not ideal for your use case but potentially could achieve your objective.

    We are currently not a full-featured logging service but we have received feature requests for this type of functionality and are evaluating it.
     
  3. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    @drewdough You'll find that almost no crash logging services also provide a full-featured, searchable logging service at the same time. We are about to integrate with a 3rd party logging service to do exactly what you're describing, because you're right, it IS extremely useful.

    On the upside, the snapshot of 50 logs leading up to the crash AND the ability to set arbitrary metadata key-value pairs is a huge, huge improvement to Unity's existing service -- to the degree that we're going to ditch a 3rd party crash-report service (Fabric) and use Unity's exclusively. (@johng_unity Thank you!)