Gamebase SDK for Unity 2.75.1 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ SetLoggerListener()

static void SetLoggerListener | ( | GamebaseCallback::Logger::ILoggerListener | listener | ) |
| static

You can be notified of the result of the log transfer through this listener.

Since
  Added 2.6.0.

Parameters

  listener | The listener that is notified of the results of the log transfer.

Example Usage :

public class LoggerListener : GamebaseCallback.Logger.ILoggerListener
{
public void OnError(GamebaseResponse.Logger.LogEntry log, string errorMessage)
{
// Sending logs failed
}
public void OnFilter(GamebaseResponse.Logger.LogEntry log, GamebaseResponse.Logger.LogFilter filter)
{
// The logs were filtered out and not sent.(Refer to AddClashFilter API Guide)
}
public void OnSave(GamebaseResponse.Logger.LogEntry log)
{
// If log transmission fails due to network disconnection, the log is saved in a file for log retransmission.(The saved file cannot be checked.)
}
public void OnSuccess(GamebaseResponse.Logger.LogEntry log)
{
// Sending logs succeeded
}
} <br>
public void SetLoggerListenerSample()
{
LoggerListener listener = new LoggerListener();
Gamebase.Logger.SetLoggerListener(listener);
}
Toast.Gamebase.Gamebase.Logger
Send a log to Log & Crash Server.
Definition: Gamebase.cs:3228