update: 更新异常上报接口

deeplink
胡宇飞 2024-02-04 21:10:25 +08:00
parent ab0a27d835
commit 3995bba61a
2 changed files with 32 additions and 4 deletions

View File

@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using Firebase.RemoteConfig;
namespace Guru namespace Guru
{ {
using System;
using System.Collections.Generic;
using Firebase.RemoteConfig;
public partial class GuruSDK public partial class GuruSDK
{ {

View File

@ -122,6 +122,7 @@ namespace Guru
_onCompleteCallback = onComplete; _onCompleteCallback = onComplete;
_isDebugEnabled = config.DebugMode; _isDebugEnabled = config.DebugMode;
GuruRepoter.Install(); // Install Crashlytics Logger
//--- 之后的逻辑放在 Start 方法内 --- //--- 之后的逻辑放在 Start 方法内 ---
} }
@ -342,6 +343,33 @@ namespace Guru
Debug.LogException(e); Debug.LogException(e);
} }
/// <summary>
/// 上报崩溃信息
/// </summary>
/// <param name="message"></param>
public static void Report(string message)
{
GuruRepoter.Log(message);
}
/// <summary>
/// 上报异常
/// </summary>
/// <param name="message"></param>
public static void ReportException(string message)
{
GuruRepoter.LogException(message);
}
/// <summary>
/// 上报异常 Exception
/// </summary>
/// <param name="ex"></param>
public static void ReportException(Exception ex)
{
GuruRepoter.LogException(ex);
}
#endregion #endregion
#region 生命周期 #region 生命周期