Explorar o código

feat: 补充上报skip日志

DoggyZhang hai 1 mes
pai
achega
9572f3a084

+ 1 - 1
frame/statistics/build.gradle

@@ -7,7 +7,7 @@ plugins {
 ext {
     GROUP_ID = 'com.wenext.android'
     ARTIFACT_ID = 'frame-statistics'
-    VERSION = '6.1.3'
+    VERSION = '6.1.4'
 }
 
 if (project.FRAME_DEBUG != "true") {

+ 5 - 1
frame/statistics/src/main/java/com/adealink/frame/statistics/report/AdjustReporter.kt

@@ -1,9 +1,10 @@
 package com.adealink.frame.statistics.report
 
 import android.os.Bundle
+import com.adealink.frame.base.AppBase
 import com.adealink.frame.statistics.CommonEventKey
+import com.adealink.frame.statistics.TAG_STAT
 import com.adealink.frame.statistics.statConfig
-import com.adealink.frame.util.safeToLong
 import com.adjust.sdk.Adjust
 import com.adjust.sdk.AdjustEvent
 
@@ -12,6 +13,7 @@ object AdjustReporter : IReport {
 
     override fun report(eventId: String, action: String?, event: HashMap<String, String>) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AdjustReporter return, for skipReport == true")
             return
         }
         action?.let {
@@ -32,6 +34,7 @@ object AdjustReporter : IReport {
 
     override fun report(eventId: String, event: Bundle) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AdjustReporter return, for skipReport == true")
             return
         }
         val params = hashMapOf<String, String>()
@@ -54,6 +57,7 @@ object AdjustReporter : IReport {
 
     override fun report(eventId: String, events: MutableMap<String, Any>, immediate: Boolean) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AdjustReporter return, for skipReport == true")
             return
         }
         val adjustEvent = AdjustEvent(eventId)

+ 5 - 0
frame/statistics/src/main/java/com/adealink/frame/statistics/report/AppFlyReporter.kt

@@ -1,7 +1,9 @@
 package com.adealink.frame.statistics.report
 
 import android.os.Bundle
+import com.adealink.frame.base.AppBase
 import com.adealink.frame.statistics.CommonEventKey
+import com.adealink.frame.statistics.TAG_STAT
 import com.adealink.frame.statistics.statConfig
 import com.adealink.frame.util.AppUtil
 import com.appsflyer.AppsFlyerLib
@@ -11,6 +13,7 @@ object AppFlyReporter : IReport {
 
     override fun report(eventId: String, action: String?, event: HashMap<String, String>) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AppFlyReporter return, for skipReport == true")
             return
         }
         action?.let {
@@ -21,6 +24,7 @@ object AppFlyReporter : IReport {
 
     override fun report(eventId: String, event: Bundle) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AppFlyReporter return, for skipReport == true")
             return
         }
         val params = hashMapOf<String, Any>()
@@ -34,6 +38,7 @@ object AppFlyReporter : IReport {
 
     override fun report(eventId: String, events: MutableMap<String, Any>, immediate: Boolean) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "AppFlyReporter return, for skipReport == true")
             return
         }
         AppsFlyerLib.getInstance().logEvent(AppUtil.appContext, "af_$eventId", events.toMap())

+ 5 - 0
frame/statistics/src/main/java/com/adealink/frame/statistics/report/FacebookReporter.kt

@@ -1,7 +1,9 @@
 package com.adealink.frame.statistics.report
 
 import android.os.Bundle
+import com.adealink.frame.base.AppBase
 import com.adealink.frame.statistics.CommonEventKey
+import com.adealink.frame.statistics.TAG_STAT
 import com.adealink.frame.statistics.addEntryToBundle
 import com.adealink.frame.statistics.statConfig
 import com.adealink.frame.util.AppUtil
@@ -13,6 +15,7 @@ object FacebookReporter: IReport {
 
     override fun report(eventId: String, action: String?, event: HashMap<String, String>) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FacebookReporter return, for skipReport == true")
             return
         }
         val bundle = Bundle()
@@ -27,6 +30,7 @@ object FacebookReporter: IReport {
 
     override fun report(eventId: String, event: Bundle) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FacebookReporter return, for skipReport == true")
             return
         }
         facebookLogger.logEvent(eventId, event)
@@ -34,6 +38,7 @@ object FacebookReporter: IReport {
 
     override fun report(eventId: String, events: MutableMap<String, Any>, immediate: Boolean) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FacebookReporter return, for skipReport == true")
             return
         }
         val bundle = Bundle()

+ 5 - 0
frame/statistics/src/main/java/com/adealink/frame/statistics/report/FirebaseReporter.kt

@@ -1,7 +1,9 @@
 package com.adealink.frame.statistics.report
 
 import android.os.Bundle
+import com.adealink.frame.base.AppBase
 import com.adealink.frame.statistics.CommonEventKey
+import com.adealink.frame.statistics.TAG_STAT
 import com.adealink.frame.statistics.addEntryToBundle
 import com.adealink.frame.statistics.statConfig
 import com.google.firebase.Firebase
@@ -18,6 +20,7 @@ object FirebaseReporter : IReport {
 
     override fun report(eventId: String, action: String?, event: HashMap<String, String>) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FirebaseReporter return, for skipReport == true")
             return
         }
         val bundle = Bundle()
@@ -32,6 +35,7 @@ object FirebaseReporter : IReport {
 
     override fun report(eventId: String, event: Bundle) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FirebaseReporter return, for skipReport == true")
             return
         }
         firebaseAnalytics.logEvent(eventId, event)
@@ -39,6 +43,7 @@ object FirebaseReporter : IReport {
 
     override fun report(eventId: String, events: MutableMap<String, Any>, immediate: Boolean) {
         if (statConfig.skipReport) {
+            AppBase.log.d(TAG_STAT, "FirebaseReporter return, for skipReport == true")
             return
         }
         val bundle = Bundle()