-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Is there any way to enable Crashlytics in the Editor? #1164
Comments
Doing some poking around in the code, it doesn't look like this sort of thing is supported, so I've made a wrapper function that at least logs it instead: public static class FirebaseLog
{
private static string AppendStacktrace(string msg)
{
// Needed because LogException doesn't include stacktrace
// Replacing newlines with 5 spaces since crashlytics doesn't display newlines
return $"{msg} {Environment.StackTrace.Replace("\n", " ")}";
}
public static void FirebaseLogError(string msg)
{
Crashlytics.SetCustomKey("Log Severity", "Error");
Crashlytics.LogException(new Exception(AppendStacktrace(msg)));
Debug.LogError(msg);
Crashlytics.SetCustomKey("Log Severity", "");
}
public static void FirebaseLogWarn(string msg)
{
Crashlytics.SetCustomKey("Log Severity", "Warn");
Crashlytics.LogException(new Exception(AppendStacktrace(msg)));
Debug.LogWarning(msg);
Crashlytics.SetCustomKey("Log Severity", "");
}
public static void FirebaseLogDebug(string msg)
{
Crashlytics.SetCustomKey("Log Severity", "Debug");
Crashlytics.LogException(new Exception(AppendStacktrace(msg)));
Debug.Log(msg);
Crashlytics.SetCustomKey("Log Severity", "");
}
} Hopefully someone finds this useful ~~ |
Hi @dginovker, The reason this isn't supported is because the crash reports are sent only once the app has been relaunched, so it's important that you build your app for this. With that being said, would you like this feature to be supported in future releases? |
Hi @paulinon ~ Yes, I would love to see a feature like that supported. Thanks for the clarification as well. |
I expect that all crashlytics logs, regardless of device, to be sent immediately (or after X logs or Y seconds) and then on restart, it'll check what is saved vs what was sent and fill in the blanks. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the question here:
When using Crashlytics, I'm able to use lines like
or
And they appear in Firebase just fine, but only on builds and not in the editor. For testing purposes, I'd like to enable them in the editor too, then just filter them out on Firebase's end like with Unity crashlytics.
Is this possible?
The text was updated successfully, but these errors were encountered: