update: 添加 Debug 模式打点保护
--story=1021118 --user=yufei.hu 【中台】【打点】打点初始化重构,添加日志缓存功能 https://www.tapd.cn/33527076/s/1159705 Signed-off-by: huyufei <yufei.hu@castbox.fm>dev
							parent
							
								
									85c8058158
								
							
						
					
					
						commit
						ff5f2df4c4
					
				|  | @ -187,14 +187,20 @@ namespace Guru | |||
| 		{ | ||||
| 			if (!_isInitOnce) | ||||
| 			{ | ||||
| 				throw new Exception($"【SDK] Analytics did not initialized, Call <Analytics.{nameof(InitAnalytics)}()> first!"); | ||||
| 				throw new Exception($"[{TAG}][SDK] Analytics did not initialized, Call <Analytics.{nameof(InitAnalytics)}()> first!"); | ||||
| 			} | ||||
| 
 | ||||
| 			 | ||||
| 			if (IsDebug && !EnableDebugAnalytics) | ||||
| 			{ | ||||
| 				Debug.LogWarning($"[{TAG}][SDK] --- LogEvent [{eventName}] can not send int Debug mode. Set <InitConfig.EnableDebugAnalytics> with `true`"); | ||||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			if (eventSetting == null) eventSetting = DefaultEventSetting; | ||||
| 
 | ||||
| 			var dataStr = ""; | ||||
| 			if (data != null) dataStr = JsonParser.ToJson(data); | ||||
| 			Debug.Log($"{TAG} --- [SDK] TrackEvent: {eventName} | priority: {priority} | data:{dataStr} | eventSetting: {eventSetting}"); | ||||
| 			Debug.Log($"[{TAG}] --- [SDK] TrackEvent: {eventName} | priority: {priority} | data:{dataStr} | eventSetting: {eventSetting}"); | ||||
| 			 | ||||
| 			try | ||||
| 			{ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue