static public int ConfigCrashReporter_s(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif System.Int32 a1; checkType(l, 1, out a1); System.Int32 a2; checkType(l, 2, out a2); BuglyAgent.ConfigCrashReporter(a1, a2); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
public static void Init() { #if UNITY_ANDROID BuglyAgent.ConfigCrashReporter(1, 1); #endif BuglyAgent.ConfigDebugMode(MSDK.isDebug); BuglyAgent.EnableExceptionHandler(); MSDKLog.Log("InitCrash of Bugly finished"); }
static int _m_ConfigCrashReporter_xlua_st_(RealStatePtr L) { try { { int _type = LuaAPI.xlua_tointeger(L, 1); int _logLevel = LuaAPI.xlua_tointeger(L, 2); BuglyAgent.ConfigCrashReporter(_type, _logLevel); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
private void Awake() { if (Application.platform == RuntimePlatform.Android && !this.androidEnable) { return; } if (Application.platform == RuntimePlatform.IPhonePlayer && !this.iosEnable) { return; } BuglyAgent.ConfigCrashReporter(1, 1); BuglyAgent.ConfigDebugMode(true); BuglyAgent.ConfigDefault(string.Empty, GlobalSettings.Instance.versionConfig.appVersion, "10000", 0L); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); BuglyAgent.ConfigAutoQuitApplication(true); BuglyAgent.RegisterLogCallback(new BuglyAgent.LogCallbackDelegate(CallbackDelegate.Instance.OnApplicationLogCallbackHandler)); BuglyAgent.InitWithAppId("900016162"); BuglyAgent.SetScene(3450); BuglyAgent.EnableExceptionHandler(); }
public void Init() { string logVersion = "MSDK Unity Version : " + WGPlatform.Version; MsdkUtil.Log(logVersion); WGPlatform.Instance.WGBuglyLog(eBuglyLogLevel.eBuglyLogLevel_D, logVersion); MessageCenter.Instance.Init(); WGPlatform.Instance.WGSetPermission(ePermission.eOPEN_ALL); BuglyAgent.ConfigCrashReporter(2, 4); // NOT Required. Enable debug log print, please set false for release version BuglyAgent.ConfigDebugMode(false); // Setting report level BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogException); // Required. If you do not need call 'InitWithAppId(string)' to initialize the sdk(may be you has initialized the sdk it associated Android or iOS project), // please call this method to enable c# exception handler only. BuglyAgent.EnableExceptionHandler(); // NOT Required. If you need to report extra data with exception, you can set the extra handler // 只在iOS的C#异常时会触发 //BuglyAgent.SetLogCallbackExtrasHandler (MyLogCallbackExtrasHandler); }