From 3995bba61aab20d971462dc7dbaff5d943277a2e Mon Sep 17 00:00:00 2001 From: huyfei Date: Sun, 4 Feb 2024 21:10:25 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Remote.cs | 8 ++++---- Runtime/Code/SDK/GuruSDK.cs | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Runtime/Code/SDK/GuruSDK.Remote.cs b/Runtime/Code/SDK/GuruSDK.Remote.cs index a4b6bdc..c3c6351 100644 --- a/Runtime/Code/SDK/GuruSDK.Remote.cs +++ b/Runtime/Code/SDK/GuruSDK.Remote.cs @@ -1,9 +1,9 @@ -using System; -using System.Collections.Generic; -using Firebase.RemoteConfig; - namespace Guru { + using System; + using System.Collections.Generic; + using Firebase.RemoteConfig; + public partial class GuruSDK { diff --git a/Runtime/Code/SDK/GuruSDK.cs b/Runtime/Code/SDK/GuruSDK.cs index 85580b5..86208ba 100644 --- a/Runtime/Code/SDK/GuruSDK.cs +++ b/Runtime/Code/SDK/GuruSDK.cs @@ -122,6 +122,7 @@ namespace Guru _onCompleteCallback = onComplete; _isDebugEnabled = config.DebugMode; + GuruRepoter.Install(); // Install Crashlytics Logger //--- 之后的逻辑放在 Start 方法内 --- } @@ -342,6 +343,33 @@ namespace Guru Debug.LogException(e); } + /// + /// 上报崩溃信息 + /// + /// + public static void Report(string message) + { + GuruRepoter.Log(message); + } + + /// + /// 上报异常 + /// + /// + public static void ReportException(string message) + { + GuruRepoter.LogException(message); + } + + /// + /// 上报异常 Exception + /// + /// + public static void ReportException(Exception ex) + { + GuruRepoter.LogException(ex); + } + #endregion #region 生命周期