void Awake() { // Enable the debug log print BuglyAgent.ConfigDebugMode(false); // Config default channel, version, user BuglyAgent.ConfigDefault(null, null, null, 0); // Config auto report log level, default is LogSeverity.LogError, so the LogError, LogException log will auto report BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); // Config auto quit the application make sure only the first one c# exception log will be report, please don't set TRUE if you do not known what are you doing. BuglyAgent.ConfigAutoQuitApplication(false); // If you need register Application.RegisterLogCallback(LogCallback), you can replace it with this method to make sure your function is ok. BuglyAgent.RegisterLogCallback(null); // Init the bugly sdk and enable the c# exception handler. BuglyAgent.InitWithAppId(BuglyAppID); // TODO 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(); // TODO NOT Required. If you need to report extra data with exception, you can set the extra handler BuglyAgent.SetLogCallbackExtrasHandler(MyLogCallbackExtrasHandler); Destroy(this); }
private void Awake() { _page1 = transform.Find("Page1").GetComponent <RawImage>(); _page1.color = new Color(1, 1, 1, 0.5f); Tweener tween1 = _page1.DOFade(1, 0.6f); DOTween.Sequence() .Append(tween1) .AppendInterval(1.0f) .AppendInterval(1.0f) .onComplete = () => { SceneManager.LoadSceneAsync("Main").completed += OnLoadScene; }; if ((float)Screen.height / Screen.width > 1.80) { CanvasScaler scaler = transform.GetComponent <CanvasScaler>(); scaler.matchWidthOrHeight = 1.0f; } if (Application.platform == RuntimePlatform.IPhonePlayer) { BuglyAgent.ConfigDebugMode(false); BuglyAgent.ConfigAutoQuitApplication(false); // BuglyAgent.InitWithAppId ("6f4e68ecf4"); //新马 BuglyAgent.InitWithAppId("f50da4d1b1"); //国内 } }
static void InitBugly() { if (Application.isEditor) { return; } // Enable the debug log print BuglyAgent.ConfigDebugMode(enable: Config.enableDebug); // Config default channel, version, user BuglyAgent.ConfigDefault(channel: Config.store, $"{Config.versionName}-{Config.versionCode}", user: UserInfoManager.getUserInfo().userId ?? "anonymous", 0); // Config auto report log level, default is LogSeverity.LogError, so the LogError, LogException log will auto report BuglyAgent.ConfigAutoReportLogLevel(level: LogSeverity.LogWarning); // Config auto quit the application make sure only the first one c# exception log will be report, please don't set TRUE if you do not known what are you doing. BuglyAgent.ConfigAutoQuitApplication(false); // If you need register Application.RegisterLogCallback(LogCallback), you can replace it with this method to make sure your function is ok. BuglyAgent.RegisterLogCallback(null); // Init the bugly sdk and enable the c# exception handler. BuglyAgent.InitWithAppId(appId: Config.buglyId); // please call this method to enable c# exception handler only. BuglyAgent.EnableExceptionHandler(); }
static public int ConfigDebugMode_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.Boolean a1; checkType(l, 1, out a1); BuglyAgent.ConfigDebugMode(a1); 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 }
void InitBuglySDK() { Debug.Log("InitBuglySDK"); // TODO NOT Required. Set the crash reporter type and log to report // BuglyAgent.ConfigCrashReporter (1, 2); #if DEBUG // 开启SDK的日志打印, 发布版本请务必关闭 BuglyAgent.ConfigDebugMode(true); #endif // TODO NOT Required. Register log callback with 'BuglyAgent.LogCallbackDelegate' to replace the 'Application.RegisterLogCallback(Application.LogCallback)' // BuglyAgent.RegisterLogCallback (CallbackDelegate.Instance.OnApplicationLogCallbackHandler); // BuglyAgent.ConfigDefault ("Bugly", null, "ronnie", 0); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId(BuglyAppIDForiOS); #elif UNITY_ANDROID BuglyAgent.InitWithAppId(BuglyAppIDForAndroid); #endif // TODO 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(); // TODO NOT Required. If you need to report extra data with exception, you can set the extra handler // BuglyAgent.SetLogCallbackExtrasHandler (MyLogCallbackExtrasHandler); BuglyAgent.PrintLog(LogSeverity.LogInfo, "Init the bugly sdk"); }
public static void SetAutoReportLogLevel(int level) { try { if (level == 5) //BuglyLogLevelVerbose { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.Log); } else if (level == 4) //BuglyLogLevelDebug { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogDebug); } else if (level == 3) //BuglyLogLevelInfo { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogInfo); } else if (level == 2) //BuglyLogLevelWarn { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogWarning); } else if (level == 1) //BuglyLogLevelError { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); } else if (level == 0) //BuglyLogLevelSilent { BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogException); BuglyAgent.ConfigDebugMode(false); } } catch (Exception ex) { MSDKLog.LogError("SetAutoReportLogLevel with unknown error = \n" + ex.Message + "\n" + ex.StackTrace); } }
void Awake() { luaenv = new LuaEnv(); gameObject.AddComponent <OutLog>(); Mono = gameObject.AddComponent <emptyMono>(); Application.targetFrameRate = AppConst.lockFrame; #if ISDEBUG //gameObject.AddComponent<TestConsole>(); m_LastUpdateShowTime = Time.realtimeSinceStartup; #endif #region bugly //开启SDK的日志打印,发布版本请务必关闭 #if ISDEBUG BuglyAgent.ConfigDebugMode(true); #else BuglyAgent.ConfigDebugMode(false); #endif //注册日志回调,替换使用'Application.RegisterLogCallback(Application.LogCallback)'注册日志回调的方式 BuglyAgent.RegisterLogCallback(OutLog.HandleLog); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId("Your App ID"); #elif UNITY_ANDROID BuglyAgent.InitWithAppId("7599ce92e1"); #endif //如果你确认已在对应的ios工程或Andoird工程初始化SDK,那么在脚本中只需启动C#异常捕获上报功能即可 BuglyAgent.EnableExceptionHandler(); #endregion EventManager.instance.RegistEvent(NetEventType.OnSetUpdateWindowTipTxt, SetUpdateTipText); }
public static void Initialize() { //---- Enable the debug log print,Release下需要设为false #if DEBUG BuglyAgent.ConfigDebugMode(true); #else BuglyAgent.ConfigDebugMode(false); #endif //---- Config default channel, version, user //BuglyAgent.ConfigDefault (null, null, null, 0); //---- Config auto report log level, default is LogSeverity.LogError, so the LogError, LogException log will auto report BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); //---- Config auto quit the application make sure only the first one c# exception log will be report, please don't set TRUE if you do not known what are you doing. //BuglyAgent.ConfigAutoQuitApplication (false); //---- If you need register Application.RegisterLogCallback(LogCallback), you can replace it with this method to make sure your function is ok. //BuglyAgent.RegisterLogCallback (null); //---- Init the bugly sdk and enable the c# exception handler. BuglyAgent.InitWithAppId(_BuglyAppID); //---- TODO 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 (); //---- TODO NOT Required. If you need to report extra data with exception, you can set the extra handler //BuglyAgent.SetLogCallbackExtrasHandler (MyLogCallbackExtrasHandler); BuglyAgent.PrintLog(LogSeverity.LogInfo, "Bugly init complete, time: {0}", System.DateTime.Now); //Debug.Log(HobaString.Format("Bugly init complete, time: {0}, verion: v{1}", System.DateTime.Now, BuglyAgent.PluginVersion)); }
public void InitBuglyAgent() { string AppKey_ios; string AppKey_Android; if (DebugConfigController.Instance.FormalData) { AppKey_Android = ConfigurationController.Instance.BuglyAppKey_AndroidFormal; AppKey_ios = ConfigurationController.Instance.BuglyAppKey_iosFormal; } else { AppKey_Android = ConfigurationController.Instance.BuglyAppKey_AndroidTest; AppKey_ios = ConfigurationController.Instance.BuglyAppKey_iosTest; } // 开启SDK的日志打印,发布版本请务必关闭 BuglyAgent.ConfigDebugMode(false); // 注册日志回调,替换使用 'Application.RegisterLogCallback(Application.LogCallback)'注册日志回调的方式 if (DebugConfigController.Instance._Debug) { BuglyAgent.RegisterLogCallback(LogCallback); } #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId(AppKey_ios); #elif UNITY_ANDROID BuglyAgent.InitWithAppId(AppKey_Android); #endif // 如果你确认已在对应的iOS工程或Android工程中初始化SDK,那么在脚本中只需启动C#异常捕获上报功能即可 BuglyAgent.EnableExceptionHandler(); //Application.logMessageReceivedThreaded += LogCallback; }
private void InitBugly() { BuglyAgent.ConfigDebugMode(SystemConfig.IsBuglySDKLogOn); BuglyAgent.ConfigDefault(SDKManager.Instance.GetSDKName(), this.GetLocalVersionsString(), SystemInfoTools.GetDeviceName(), 0L); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); BuglyAgent.ConfigAutoQuitApplication(false); BuglyAgent.InitWithAppId("900057844"); BuglyAgent.EnableExceptionHandler(); }
/// <summary> /// 初始化bugly /// </summary> public void InitBuglySDK() { #if UNITY_ANDROID || UNITY_IPHONE || UNITY_IOS // TODO NOT Required. Set the crash reporter type and log to report // BuglyAgent.ConfigCrashReporter (1, 2); // TODO NOT Required. Enable debug log print, please set false for release version #if DEBUG BuglyAgent.ConfigDebugMode(true); #endif //BuglyAgent.ConfigDebugMode(true); // TODO NOT Required. Register log callback with 'BuglyAgent.LogCallbackDelegate' to replace the 'Application.RegisterLogCallback(Application.LogCallback)' // BuglyAgent.RegisterLogCallback (CallbackDelegate.Instance.OnApplicationLogCallbackHandler); // BuglyAgent.ConfigDefault ("Bugly", null, "ronnie", 0); #if UNITY_IPHONE || UNITY_IOS if (Const.Region == RegionType.CHINA) { var channel = string.Format("{0}_{1}", GlobalConfig.Instance.Channel, GlobalConfig.Instance.SubChannel); BuglyAgent.ConfigDefault(channel, null, null, 0); BuglyAgent.InitWithAppId("d47e3e83c9"); } else if (Const.Region == RegionType.HKTW) { BuglyAgent.InitWithAppId("af2d9108c7"); } else if (Const.Region == RegionType.KOREA) { BuglyAgent.InitWithAppId("c5ab48ff08"); } else if (Const.Region == RegionType.SEASIA) { BuglyAgent.InitWithAppId("9baaf461f1"); } // iOS工程启动初始化 #elif UNITY_ANDROID // BuglyAgent.InitWithAppId ("900036622"); // android工程启动初始化 #endif //BuglyAgent.SetUserId(); // TODO 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(); // If you need to report extra data with exception, you can set the extra handler //BuglyAgent.SetLogCallbackExtrasHandler(LogCallbackExtrasHandler); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogException); BuglyAgent.PrintLog(LogSeverity.LogInfo, "Init the bugly sdk"); LogExtraInfo(); #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"); }
private void initBugly() { GuLog.Debug("initBugly"); BuglyAgent.ConfigDebugMode(true); #if UNITY_ANDROID BuglyAgent.InitWithAppId("fced1ab5e5"); #endif BuglyAgent.EnableExceptionHandler(); }
private void Awake() { BuglyAgent.ConfigDebugMode(false); BuglyAgent.ConfigDefault(null, null, null, 0L); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); BuglyAgent.ConfigAutoQuitApplication(false); BuglyAgent.RegisterLogCallback(null); BuglyAgent.InitWithAppId("YOUR APP ID GOES HERE"); Object.Destroy(this); }
private static void Bugly_Init() { BuglyAgent.ConfigDebugMode(false); BuglyAgent.ConfigDefault(null, null, null, 0L); BuglyAgent.ConfigAutoReportLogLevel(5); BuglyAgent.ConfigAutoQuitApplication(false); BuglyAgent.RegisterLogCallback(null); BuglyAgent.InitWithAppId("8c142b9f46"); BuglyAgent.EnableExceptionHandler(); }
public void Init() { if (!SDKConfig.S.buglyConfig.isEnable) { return; } BuglyAgent.ConfigDebugMode(SDKConfig.S.buglyConfig.isDebugMode); BuglyAgent.InitWithAppId(GetBuglyID(SDKConfig.S.buglyConfig)); Log.i("Init[BuglyMgr]"); }
private void Awake() { BuglyAgent.ConfigDebugMode(false); BuglyAgent.ConfigDefault(null, null, null, 0L); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogError); BuglyAgent.ConfigAutoQuitApplication(false); BuglyAgent.RegisterLogCallback(null); BuglyAgent.InitWithAppId("YOUR APP ID GOES HERE"); BuglyAgent.EnableExceptionHandler(); BuglyAgent.SetLogCallbackExtrasHandler(new Func <Dictionary <string, string> >(BuglyInit.MyLogCallbackExtrasHandler)); UnityEngine.Object.Destroy(this); }
public void Init() { BuglyAgent.ConfigDebugMode(true); BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogWarning); BuglyAgent.ConfigDefault(channel, "", "", 0); BuglyAgent.InitWithAppId(appId);//初始化 // BuglyAgent.SetUserId(Config.UserId); BuglyAgent.EnableExceptionHandler();//启动异常上报 }
public static void SetupBugly() { //初始化Bugly BuglyAgent.ConfigDebugMode(true); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId("900059347"); #elif UNITY_ANDROID BuglyAgent.InitWithAppId("900059341"); #endif BuglyAgent.EnableExceptionHandler(); // //end Bugly }
void Start() { #if UNITY_IOS BuglyAgent.InitWithAppId("your ios app id"); #elif UNITY_ANDROID //GamePlayerActivity已初始化,此处不需要再调用。 #endif BuglyAgent.ConfigDebugMode(false); BuglyAgent.EnableExceptionHandler(); Test(); }
private void Bugly_Init() { // 开启SDK的日志打印,发布版本请务必关闭 BuglyAgent.ConfigDebugMode(true); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId("8ec9139b10"); #elif UNITY_ANDROID BuglyAgent.InitWithAppId("085dd1eab0"); #endif //如果你确认已在对应的iOS工程或Android工程中初始化SDK,那么在脚本中只需启动C#异常捕获上报功能即可 BuglyAgent.EnableExceptionHandler(); }
private void InitBugly() { // 开启SDK的日志打印,发布版本请务必关闭 BuglyAgent.ConfigDebugMode(Debug.isDebugBuild); BuglyAgent.InitWithAppId(GameApp.Options.BuglyAppID); BuglyAgent.SetScene(Application.loadedLevel); BuglyAgent.SetUserId(Application.companyName + "." + Application.productName); if (GameApp.Options.EnableLog2File) { BuglyAgent.RegisterLogCallback(Application_logMessageReceived); RemoteOldFile(); } }
private void InitBuglySDK() { BuglyAgent.ConfigDebugMode(false); BuglyAgent.InitWithAppId("004e85ad39"); BuglyAgent.EnableExceptionHandler(); BuglyAgent.PrintLog(LogSeverity.LogInfo, "Init the bugly sdk"); // set tag #if UNITY_ANDROID BuglyAgent.SetScene(3450); #else BuglyAgent.SetScene(3261); #endif }
void InitBuglySDK() { // 开启SDK的日志打印,发布版本请务必关闭 BuglyAgent.ConfigDebugMode(true); // 注册日志回调,替换使用 'Application.RegisterLogCallback(Application.LogCallback)'注册日志回调的方式 // BuglyAgent.RegisterLogCallback (CallbackDelegate.Instance.OnApplicationLogCallbackHandler); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId("f71aaa33e2"); #elif UNITY_ANDROID BuglyAgent.InitWithAppId("Your App ID"); #endif // 如果你确认已在对应的iOS工程或Android工程中初始化SDK,那么在脚本中只需启动C#异常捕获上报功能即可 BuglyAgent.EnableExceptionHandler(); }
private void Awake() { this._interface = new JoyYouSDK(); BuglyAgent.ConfigDebugMode(false); switch (Application.platform) { case RuntimePlatform.IPhonePlayer: BuglyAgent.InitWithAppId("i1105309683"); break; case RuntimePlatform.Android: BuglyAgent.InitWithAppId("1105309683"); break; } BuglyAgent.EnableExceptionHandler(); }
static int _m_ConfigDebugMode_xlua_st_(RealStatePtr L) { try { { bool _enable = LuaAPI.lua_toboolean(L, 1); BuglyAgent.ConfigDebugMode(_enable); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
void InitBuglySDK() { // enable debug log print BuglyAgent.ConfigDebugMode(true); // Register log callback with 'BuglyAgent.LogCallbackDelegate' to replace the 'Application.RegisterLogCallback(Application.LogCallback)' BuglyAgent.RegisterLogCallback(CallbackDelegate.Instance.OnApplicationLogCallbackHandler); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId("900001055"); #elif UNITY_ANDROID BuglyAgent.InitWithAppId("900001191"); #endif // 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(); }
public void init(TyCrashReport.initInfo info) { // enable debug log print BuglyAgent.ConfigDebugMode(info._debuglogprint); // Register log callback with 'BuglyAgent.LogCallbackDelegate' to replace the 'Application.RegisterLogCallback(Application.LogCallback)' //BuglyAgent.RegisterLogCallback(CallbackDelegate.Instance.OnApplicationLogCallbackHandler); BuglyAgent.RegisterLogCallback(null); BuglyAgent.ConfigDefault(info._channel, info._ver, info._user, 0); #if UNITY_IPHONE || UNITY_IOS BuglyAgent.InitWithAppId(info._appId_IOS); #elif UNITY_ANDROID BuglyAgent.InitWithAppId(info._appId_Android); #endif // 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(); }
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); }