This commit is contained in:
juntao
2021-02-02 16:49:48 +08:00
parent 3b8d34f8c3
commit a4a029f31e
3 changed files with 37 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import com.gh.gamecenter.entity.CommunityEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.ShareResultEntity;
import com.gh.gamecenter.entity.SpecialColumn;
import com.gh.gamecenter.entity.StartupAdEntity;
import com.gh.gamecenter.manager.UserManager;
import com.gh.gamecenter.qa.entity.Questions;
import com.gh.gamecenter.retrofit.EmptyResponse;
@ -786,4 +787,29 @@ public class LogUtils {
}
LoghubUtils.log(object, "event", false);
}
public static void logStartAd(String event, StartupAdEntity adEntity) {
JSONObject object = new JSONObject();
try {
object.put("event", event);
object.put("timestamp", System.currentTimeMillis() / 1000);
object.put("meta", getMetaObject());
if (adEntity != null) {
object.put("abs_id", adEntity.getId());
object.put("abs_text", adEntity.getDesc());
if (adEntity.getButton()) {
object.put("abs_type", adEntity.getJump().getType());
object.put("abs_link", adEntity.getJump().getLink());
object.put("abs_link_title", adEntity.getJump().getText());
}
}
} catch (JSONException e) {
e.printStackTrace();
}
if (BuildConfig.DEBUG) {
Utils.log("LogUtils->" + object.toString());
}
LoghubUtils.log(object, "event", false);
}
}