Gamebase SDK for Unity 2.76.0 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ AddCrashFilter()

static void AddCrashFilter | ( | GamebaseCallback.Logger.CrashFilter | filter | ) |
| static

This function adds a CrashFilter.

When a crash occurs, the filter lets you decide whether to send logs to the Log & Crash server. When return value is true, log is not sent to Log & Crash server.

Since
  Added 2.6.0.

Parameters

  filter | This is a filter to check whether logs are sent to the Log & Crash server when a crash occurs.

Example Usage :

public GamebaseCallback.Logger.CrashFilter crashFilter = (crashLogData) =>
{
// If the return value is true, no log is sent.
// The properties of CrashLogData are the same as the parameters of Application.LogCallback on Unity.
// https://docs.unity3d.com/ScriptReference/Application.LogCallback.html
return crashLogData.condition.Contains("UnityEngine.Debug.Log");
};
public void AddCrashFilterSample()
{
Gamebase.Logger.AddCrashFilter(crashFilter);
}
Toast.Gamebase.Gamebase.Logger.AddCrashFilter
static void AddCrashFilter(GamebaseCallback.Logger.CrashFilter filter)
This function adds a CrashFilter.
Definition Gamebase.cs:3575
Toast.Gamebase.Gamebase.Logger
Send a log to Log & Crash Server.
Definition Gamebase.cs:3309
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11