Search Unity

A few requests - custom string in crash, and support for Debug.LogError

Discussion in 'Unity Cloud Diagnostics' started by smithmj5, Jul 9, 2015.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    The exception reporting works great, awesome job!

    I do have a couple of requests though, to make it even more useful.
    1. Support for logging an error when using Debug.LogError. Right now I've gotten around this by throwing a new Exception with the message passed into Debug.LogError, but it would be nice if this was something that was built-in, if possible.
    2. The option to pass a custom string along with an error/exception. In my game, I have a "session log" that tracks important events, here's an example:
    Start on title screen clicked
    Item purchased, money: 500
    Stage started: 10
    Stage failed: 10
    etc.

    It would be great if I could pass in the last 250 or so characters of my session log, since that gives some context as to how the error might have occurred. There is support for this in Flox analytics (fantastic Flash/Starling analytics package) and it's been invaluable for tracking down some tough-to-find errors.

    Cheers!
     
    Wattosan likes this.
  2. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    We have thought about different log levels, and it certainly comes with some technical challenges on our side. (Say if you accidentally shipped a debugging print statement)

    Likewise accepting a session log would be cool, and it would also come with a lot of data. As you pointed out, it is pretty valuable when trying to reproduce a bug, so it is definitely on our minds.
     
    Wattosan likes this.
  3. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Has this become possible? The only thing close to this is having the last 50 logs with the exception. But this still requires throwing an exception. It would be nice if we could send custom logs to diagnostics without having to actually throw the error.

    For example, sometimes there are references missing, which we'd like to catch in builds but not halt the code. So if, e.g a visual effect reference is missing, we'd like to know about this but would not want it to halt the rest of the logic.