Commit 018badf8 by 刘鹏

feat: 组件阿里云埋点改用platform增加丰富参数埋点,方便后续定位问题

parent cb4f68c6
...@@ -8,9 +8,9 @@ ext { ...@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.49.05", "m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68", "m-consultant" : "0.0.59.68",
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.24", "m-user" : "0.0.61.25",
"m-home" : "0.0.22.59", "m-home" : "0.0.22.59",
"m-im" : "0.0.18.46", "m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19", "m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
...@@ -33,13 +33,13 @@ ext { ...@@ -33,13 +33,13 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.97", "ydl-platform" : "0.0.39.99",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.38", "ydl-webview" : "0.0.38.40",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.16", "ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.34", "m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20", "ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动 //以下 几乎不会动
...@@ -88,12 +88,12 @@ ext { ...@@ -88,12 +88,12 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.49.04", "m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68", "m-consultant" : "0.0.59.68",
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.24", "m-user" : "0.0.61.25",
"m-home" : "0.0.22.59", "m-home" : "0.0.22.59",
"m-im" : "0.0.18.46", "m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19", "m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6", "m-article" : "0.0.0.6",
...@@ -115,13 +115,13 @@ ext { ...@@ -115,13 +115,13 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.97", "ydl-platform" : "0.0.39.99",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.38", "ydl-webview" : "0.0.38.40",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.16", "ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.34", "m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20", "ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动 //以下 几乎不会动
......
...@@ -47,10 +47,10 @@ import com.ydl.ydlcommon.utils.LogUtil ...@@ -47,10 +47,10 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
import io.agora.rtc.Constants import io.agora.rtc.Constants
...@@ -139,7 +139,7 @@ class ConsultantAudioHomeActivity : ...@@ -139,7 +139,7 @@ class ConsultantAudioHomeActivity :
super.onJoinChannelSuccess(channel, uid, elapsed) super.onJoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 加入频道回调") LogUtil.e("[agora]$uid 加入频道回调")
writeAgoraLog("被叫(用户)加入声网($channel)频道成功") writeAgoraLog("被叫(用户)加入声网($channel)频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功")
runOnUiThread { runOnUiThread {
// 加入频道后再通知用户已接受 // 加入频道后再通知用户已接受
// YDLRTMClient.instances.acceptCall(mAudioMessageBean?.channelId) // YDLRTMClient.instances.acceptCall(mAudioMessageBean?.channelId)
...@@ -167,8 +167,8 @@ class ConsultantAudioHomeActivity : ...@@ -167,8 +167,8 @@ class ConsultantAudioHomeActivity :
super.onRejoinChannelSuccess(channel, uid, elapsed) super.onRejoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 重新加入频道回调") LogUtil.e("[agora]$uid 重新加入频道回调")
writeAgoraLog("被叫(用户)重新加入声网频道($channel)成功") writeAgoraLog("被叫(用户)重新加入声网频道($channel)成功")
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功") .sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功")
runOnUiThread { runOnUiThread {
if (!isConnectSuccess) { if (!isConnectSuccess) {
...@@ -187,7 +187,7 @@ class ConsultantAudioHomeActivity : ...@@ -187,7 +187,7 @@ class ConsultantAudioHomeActivity :
super.onUserJoined(uid, elapsed) super.onUserJoined(uid, elapsed)
LogUtil.e("[agora]远端用户加入频道回调") LogUtil.e("[agora]远端用户加入频道回调")
writeAgoraLog("主叫(专家)加入声网频道成功") writeAgoraLog("主叫(专家)加入声网频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功")
//另一方加入频道成功 //另一方加入频道成功
runOnUiThread { runOnUiThread {
...@@ -230,7 +230,7 @@ class ConsultantAudioHomeActivity : ...@@ -230,7 +230,7 @@ class ConsultantAudioHomeActivity :
override fun onLeaveChannel(stats: IRtcEngineEventHandler.RtcStats?) { override fun onLeaveChannel(stats: IRtcEngineEventHandler.RtcStats?) {
super.onLeaveChannel(stats) super.onLeaveChannel(stats)
LogUtil.e("[agora]自己离开频道回调") LogUtil.e("[agora]自己离开频道回调")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "自己离开频道回调") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "自己离开频道回调")
//通知php 通话已结束 //通知php 通话已结束
close(RESULT_ANSWERED_CODE, "") close(RESULT_ANSWERED_CODE, "")
...@@ -258,7 +258,7 @@ class ConsultantAudioHomeActivity : ...@@ -258,7 +258,7 @@ class ConsultantAudioHomeActivity :
) )
showToast("对方已挂断") showToast("对方已挂断")
writeAgoraLog("通话接通后挂断:主叫(专家)离开频道") writeAgoraLog("通话接通后挂断:主叫(专家)离开频道")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道")
if (null != totalDisposable) { if (null != totalDisposable) {
totalDisposable!!.dispose() totalDisposable!!.dispose()
...@@ -276,7 +276,7 @@ class ConsultantAudioHomeActivity : ...@@ -276,7 +276,7 @@ class ConsultantAudioHomeActivity :
} }
LogUtil.e("[agora]发生警告回调=$warn") LogUtil.e("[agora]发生警告回调=$warn")
writeAgoraLog("声网警告回调码:($warn)") writeAgoraLog("声网警告回调码:($warn)")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)")
//103:没有可用的频道资源。可能是因为服务端没法分配频道资源 //103:没有可用的频道资源。可能是因为服务端没法分配频道资源
//104:查找频道超时。在加入频道时 SDK 先要查找指定的频道,出现该警告一般是因为网络太差,连接不到服务器 //104:查找频道超时。在加入频道时 SDK 先要查找指定的频道,出现该警告一般是因为网络太差,连接不到服务器
...@@ -303,7 +303,7 @@ class ConsultantAudioHomeActivity : ...@@ -303,7 +303,7 @@ class ConsultantAudioHomeActivity :
uploadException("mRtcEventHandler-onError:errorCode--%${err}") uploadException("mRtcEventHandler-onError:errorCode--%${err}")
LogUtil.e("[agora] 发生错误回调 =$err") LogUtil.e("[agora] 发生错误回调 =$err")
writeAgoraLog("声网错误回调errorCode--%${err}") writeAgoraLog("声网错误回调errorCode--%${err}")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
//3:SDK 初始化失败。Agora 建议尝试以下处理方法 //3:SDK 初始化失败。Agora 建议尝试以下处理方法
//7:SDK 尚未初始化,就调用其 API。请确认在调用 API 之前已创建 RtcEngine 对象并完成初始化 //7:SDK 尚未初始化,就调用其 API。请确认在调用 API 之前已创建 RtcEngine 对象并完成初始化
...@@ -524,7 +524,7 @@ class ConsultantAudioHomeActivity : ...@@ -524,7 +524,7 @@ class ConsultantAudioHomeActivity :
override fun channelTokenResponse(token: String?, needJoinChannel: Boolean) { override fun channelTokenResponse(token: String?, needJoinChannel: Boolean) {
if (TextUtils.isEmpty(token)) { if (TextUtils.isEmpty(token)) {
LogUtil.e("[agora]token not null") LogUtil.e("[agora]token not null")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "token isEmpty ") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "token isEmpty ")
showToast("通话频道不存在") showToast("通话频道不存在")
finish() finish()
...@@ -599,7 +599,7 @@ class ConsultantAudioHomeActivity : ...@@ -599,7 +599,7 @@ class ConsultantAudioHomeActivity :
val account = YdlCommonRouterManager.getYdlCommonRoute().getUid() val account = YdlCommonRouterManager.getYdlCommonRoute().getUid()
if (!TextUtils.isEmpty(mAudioMessageBean?.channelId)) { if (!TextUtils.isEmpty(mAudioMessageBean?.channelId)) {
LogUtil.e("[agora] joinChannel:$account") LogUtil.e("[agora] joinChannel:$account")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "joinChannel:$account") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "joinChannel:$account")
voiceManage?.getVoiceApi()?.joinChannel( voiceManage?.getVoiceApi()?.joinChannel(
channelToken channelToken
...@@ -825,8 +825,8 @@ class ConsultantAudioHomeActivity : ...@@ -825,8 +825,8 @@ class ConsultantAudioHomeActivity :
fun close(code: Int, msg: String) { fun close(code: Int, msg: String) {
runOnUiThread { runOnUiThread {
LogUtil.e("[agora]close(code:$code,msg:$msg)") LogUtil.e("[agora]close(code:$code,msg:$msg)")
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)") .sendRichLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)")
//上传日志文件 //上传日志文件
uploadLog() uploadLog()
...@@ -858,7 +858,7 @@ class ConsultantAudioHomeActivity : ...@@ -858,7 +858,7 @@ class ConsultantAudioHomeActivity :
} }
ActivityManager.getInstance().removeStack(activity = this) ActivityManager.getInstance().removeStack(activity = this)
LogUtil.e("[agora]页面移除") LogUtil.e("[agora]页面移除")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "页面移除") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "页面移除")
finish() finish()
} }
} }
......
...@@ -10,8 +10,8 @@ import com.netease.nimlib.sdk.avchat.AVChatManager; ...@@ -10,8 +10,8 @@ import com.netease.nimlib.sdk.avchat.AVChatManager;
import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand; import com.netease.nimlib.sdk.avchat.constant.AVChatControlCommand;
import com.netease.nimlib.sdk.avchat.model.AVChatData; import com.netease.nimlib.sdk.avchat.model.AVChatData;
import com.ydl.ydlcommon.base.BaseActivityMgr; import com.ydl.ydlcommon.base.BaseActivityMgr;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.activity.AVChatActivity; import com.yidianling.avchatkit.activity.AVChatActivity;
import com.yidianling.avchatkit.common.log.ILogUtil; import com.yidianling.avchatkit.common.log.ILogUtil;
import com.yidianling.avchatkit.common.log.LogUtil; import com.yidianling.avchatkit.common.log.LogUtil;
...@@ -151,7 +151,7 @@ public class AVChatKit { ...@@ -151,7 +151,7 @@ public class AVChatKit {
*/ */
public static void outgoingCall(Context context, String account, String displayName, int callType, int source) { public static void outgoingCall(Context context, String account, String displayName, int callType, int source) {
AVChatActivity.outgoingCall(context, account, displayName, callType, source); AVChatActivity.outgoingCall(context, account, displayName, callType, source);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingCall 发起音视频通话呼叫"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"outgoingCall 发起音视频通话呼叫");
} }
...@@ -166,7 +166,7 @@ public class AVChatKit { ...@@ -166,7 +166,7 @@ public class AVChatKit {
*/ */
public static void outgoingTeamCall(Context context, boolean receivedCall, String teamId, String roomId, ArrayList<String> accounts, String teamName) { public static void outgoingTeamCall(Context context, boolean receivedCall, String teamId, String roomId, ArrayList<String> accounts, String teamName) {
TeamAVChatActivity.startActivity(context, receivedCall, teamId, roomId, accounts, teamName); TeamAVChatActivity.startActivity(context, receivedCall, teamId, roomId, accounts, teamName);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
} }
/** /**
......
...@@ -11,8 +11,8 @@ import android.os.Build; ...@@ -11,8 +11,8 @@ import android.os.Build;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.text.TextUtils; import android.text.TextUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.common.log.LogUtil; import com.yidianling.avchatkit.common.log.LogUtil;
public class NetworkUtil { public class NetworkUtil {
...@@ -148,7 +148,7 @@ public class NetworkUtil { ...@@ -148,7 +148,7 @@ public class NetworkUtil {
} }
} }
curNetworkType = type; curNetworkType = type;
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
return type; return type;
} }
...@@ -274,10 +274,10 @@ public class NetworkUtil { ...@@ -274,10 +274,10 @@ public class NetworkUtil {
NetworkInfo ni = cm.getActiveNetworkInfo(); NetworkInfo ni = cm.getActiveNetworkInfo();
if (ni != null) { if (ni != null) {
if (ni.getType() == ConnectivityManager.TYPE_WIFI) { if (ni.getType() == ConnectivityManager.TYPE_WIFI) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
return true; return true;
} else { } else {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
return false; return false;
} }
......
...@@ -35,8 +35,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatParameters; ...@@ -35,8 +35,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatParameters;
import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer; import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer;
import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory; import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory;
import com.netease.nrtc.video.render.IVideoRender; import com.netease.nrtc.video.render.IVideoRender;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit; import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.TeamAVChatProfile; import com.yidianling.avchatkit.TeamAVChatProfile;
import com.yidianling.avchatkit.common.activity.AVChatBaseUI; import com.yidianling.avchatkit.common.activity.AVChatBaseUI;
...@@ -438,7 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -438,7 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
public void onSuccess(AVChatData data) { public void onSuccess(AVChatData data) {
chatId = data.getChatId(); chatId = data.getChatId();
LogUtil.i(TAG, "join room success, roomId=" + roomId + ", chatId=" + chatId); LogUtil.i(TAG, "join room success, roomId=" + roomId + ", chatId=" + chatId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room success, roomId=" + roomId + ", chatId=" + chatId); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"join room success, roomId=" + roomId + ", chatId=" + chatId);
} }
@Override @Override
...@@ -461,16 +461,16 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -461,16 +461,16 @@ public class TeamAVChatActivity extends AVChatBaseUI {
startLocalPreview(); startLocalPreview();
startTimerForCheckReceivedCall(); startTimerForCheckReceivedCall();
LogUtil.i(TAG, "team avchat running..." + ", roomId=" + roomId); LogUtil.i(TAG, "team avchat running..." + ", roomId=" + roomId);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"onJoinRoomSuccess 进入房间成功"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"onJoinRoomSuccess 进入房间成功");
} }
private void onJoinRoomFailed(int code, Throwable e) { private void onJoinRoomFailed(int code, Throwable e) {
if (code == ResponseCode.RES_ENONEXIST) { if (code == ResponseCode.RES_ENONEXIST) {
showToast(getString(R.string.im_t_avchat_join_fail_not_exist)); showToast(getString(R.string.im_t_avchat_join_fail_not_exist));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"startRtc 进入房间失败 房间不存在 code:"+code); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"startRtc 进入房间失败 房间不存在 code:"+code);
} else { } else {
showToast("join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage())); showToast("join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage())); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"join room failed, code=" + code + ", e=" + (e == null ? "" : e.getMessage()));
} }
} }
...@@ -490,7 +490,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -490,7 +490,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState(); updateAudioMuteButtonState();
LogUtil.i(TAG, "on user joined, account=" + account); LogUtil.i(TAG, "on user joined, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user joined, account=" + account); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"on user joined, account=" + account);
} }
public void onAVChatUserLeave(String account) { public void onAVChatUserLeave(String account) {
...@@ -504,7 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI { ...@@ -504,7 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState(); updateAudioMuteButtonState();
LogUtil.i(TAG, "on user leave, account=" + account); LogUtil.i(TAG, "on user leave, account=" + account);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"on user leave, account=" + account); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"on user leave, account=" + account);
} }
private void startLocalPreview() { private void startLocalPreview() {
......
...@@ -17,10 +17,10 @@ import com.ydl.ydlcommon.ui.LoadingDialogFragment ...@@ -17,10 +17,10 @@ import com.ydl.ydlcommon.ui.LoadingDialogFragment
import com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance import com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance
import com.ydl.ydlcommon.utils.NetworkParamsUtils import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper.Companion.getInstance
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R import com.yidianling.im.R
...@@ -196,7 +196,7 @@ object IMChatUtil { ...@@ -196,7 +196,7 @@ object IMChatUtil {
isFromQingShu: Int, isFromQingShu: Int,
context: AppCompatActivity context: AppCompatActivity
) { ) {
getInstance().sendLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo) val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession( SessionHelper.startP2PSession(
......
...@@ -5,8 +5,8 @@ import android.content.Context; ...@@ -5,8 +5,8 @@ import android.content.Context;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment; import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage; import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.nimbase.api.BaseNimUIKit; import com.yidianling.nimbase.api.BaseNimUIKit;
import com.yidianling.nimbase.api.model.session.SessionCustomization; import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity; import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity;
...@@ -32,7 +32,7 @@ public class NimUIKit extends BaseNimUIKit { ...@@ -32,7 +32,7 @@ public class NimUIKit extends BaseNimUIKit {
*/ */
public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization
customization, IMMessage anchor, IP2PCustomActionHandler handler) { customization, IMMessage anchor, IP2PCustomActionHandler handler) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "startYDLChatting 打开壹点灵定制聊天窗口,开始聊天"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startYDLChatting 打开壹点灵定制聊天窗口,开始聊天");
NimUIKitImpl.startChatting(context, id, sessionType, customization, anchor, handler); NimUIKitImpl.startChatting(context, id, sessionType, customization, anchor, handler);
} }
......
...@@ -16,8 +16,8 @@ import com.netease.nimlib.sdk.msg.MsgServiceObserve; ...@@ -16,8 +16,8 @@ import com.netease.nimlib.sdk.msg.MsgServiceObserve;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.CustomNotification; import com.netease.nimlib.sdk.msg.model.CustomNotification;
import com.netease.nimlib.sdk.msg.model.IMMessage; import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack; import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack;
...@@ -151,7 +151,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -151,7 +151,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers(false); registerObservers(false);
super.onDestroy(); super.onDestroy();
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"退出聊天页面"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"退出聊天页面");
} }
@Override @Override
......
...@@ -49,11 +49,11 @@ import com.ydl.ydlcommon.utils.LogUtil; ...@@ -49,11 +49,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil; import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils; import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.utils.log.LogHelper; import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.view.CircleImageView; import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog; import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.helper.IMChatUtil; import com.yidianling.im.helper.IMChatUtil;
...@@ -1184,14 +1184,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1184,14 +1184,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
}); });
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendMessage 该消息发送成功"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendMessage 该消息发送成功 sessionId:" + sessionId);
} else { } else {
// 替换成tip // 替换成tip
message = MessageBuilder.createTipMessage(message.getSessionId(), message.getSessionType()); message = MessageBuilder.createTipMessage(message.getSessionId(), message.getSessionType());
message.setContent("该消息无法发送"); message.setContent("该消息无法发送");
message.setStatus(MsgStatusEnum.success); message.setStatus(MsgStatusEnum.success);
NIMClient.getService(MsgService.class).saveMessageToLocal(message, false); NIMClient.getService(MsgService.class).saveMessageToLocal(message, false);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendMessage 该消息无法发送"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendMessage 该消息无法发送 sessionId:" + sessionId);
} }
messageListPanel.onMsgSend(message); messageListPanel.onMsgSend(message);
...@@ -1219,11 +1219,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -1219,11 +1219,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:已被对方拉黑"); LogHelper.Companion.getInstance().writeLogSync("发送消息失败:已被对方拉黑");
ToastUtil.toastLong(getActivity(), "您已被对方拉黑!"); ToastUtil.toastLong(getActivity(), "您已被对方拉黑!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:已被对方拉黑"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:已被对方拉黑 sessionId:" + sessionId);
} else if (code == 404) { } else if (code == 404) {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:对象不见了"); LogHelper.Companion.getInstance().writeLogSync("发送消息失败:对象不见了");
ToastUtil.toastLong(getActivity(), "对象不见了!"); ToastUtil.toastLong(getActivity(), "对象不见了!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:对象不见了 404"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:对象不见了 404 sessionId:" + sessionId);
} else { } else {
//上传至后台 //上传至后台
......
...@@ -6,8 +6,8 @@ import com.tencent.bugly.crashreport.CrashReport ...@@ -6,8 +6,8 @@ import com.tencent.bugly.crashreport.CrashReport
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.im.api.bean.IMLoginInfo import com.yidianling.im.api.bean.IMLoginInfo
import com.yidianling.im.api.bean.IMRequestCallback import com.yidianling.im.api.bean.IMRequestCallback
...@@ -61,19 +61,19 @@ object LoginUtils { ...@@ -61,19 +61,19 @@ object LoginUtils {
override fun onSuccess(t: IMLoginInfo?) { override fun onSuccess(t: IMLoginInfo?) {
LogUtil.e("IM登录成功:" + "info.account:" + info.account + "info.passWord" + info.passWord) LogUtil.e("IM登录成功:" + "info.account:" + info.account + "info.passWord" + info.passWord)
UserIn.imSetAccount(userInfo?.uid ?: "") UserIn.imSetAccount(userInfo?.uid ?: "")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "IM登录成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "IM登录成功")
} }
override fun onFailed(i: Int) { override fun onFailed(i: Int) {
LogUtil.e("IM登录失败:$i" + "info.account:" + info.account + "info.passWord" + info.passWord) LogUtil.e("IM登录失败:$i" + "info.account:" + info.account + "info.passWord" + info.passWord)
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "IM登录失败") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "IM登录失败")
} }
override fun onException(throwable: Throwable?) { override fun onException(throwable: Throwable?) {
LogUtil.e("IM登录onException:${throwable?.message}") LogUtil.e("IM登录onException:${throwable?.message}")
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}") .sendRichLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}")
} }
} }
...@@ -98,7 +98,7 @@ object LoginUtils { ...@@ -98,7 +98,7 @@ object LoginUtils {
@JvmStatic @JvmStatic
fun logoutClearLocal() { fun logoutClearLocal() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "退出登录") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "退出登录")
UserIn.imLogout() UserIn.imLogout()
UserIn.closePlayer() UserIn.closePlayer()
UserIn.clearImData() UserIn.clearImData()
......
...@@ -14,9 +14,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut ...@@ -14,9 +14,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.UserInfoCache import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.im.api.bean.IMLoginInfo import com.yidianling.im.api.bean.IMLoginInfo
import com.yidianling.im.api.bean.IMRequestCallback import com.yidianling.im.api.bean.IMRequestCallback
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
...@@ -171,14 +171,14 @@ class SmsLoginActivity : BaseActivity() { ...@@ -171,14 +171,14 @@ class SmsLoginActivity : BaseActivity() {
// finish() // finish()
LoginUtils.loginSuccessOperate(this) LoginUtils.loginSuccessOperate(this)
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 成功") .sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 成功")
}, object : ThrowableConsumer() { }, object : ThrowableConsumer() {
override fun accept(msg: String) { override fun accept(msg: String) {
dismissProgressDialog() dismissProgressDialog()
YdlCommonOut.showToast(msg) YdlCommonOut.showToast(msg)
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ") .sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ")
} }
}) })
} }
......
...@@ -26,9 +26,9 @@ import com.ydl.ydlcommon.utils.JPushUtils ...@@ -26,9 +26,9 @@ import com.ydl.ydlcommon.utils.JPushUtils
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.RxAppTool import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
...@@ -430,7 +430,7 @@ object OneKeyLoginHelp { ...@@ -430,7 +430,7 @@ object OneKeyLoginHelp {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ .subscribe({
if (it.code == 200) { if (it.code == 200) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录成功")
ToastUtil.toastShort("登录成功") ToastUtil.toastShort("登录成功")
saveUserData(it.data) saveUserData(it.data)
if (it.data.firstLogin == 1) {//第一次登录:是注册 if (it.data.firstLogin == 1) {//第一次登录:是注册
...@@ -464,12 +464,12 @@ object OneKeyLoginHelp { ...@@ -464,12 +464,12 @@ object OneKeyLoginHelp {
LoginUtils.loginSuccessOperate(mActivity) LoginUtils.loginSuccessOperate(mActivity)
} }
} else { } else {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}")
ToastUtil.toastShort(it.msg) ToastUtil.toastShort(it.msg)
mPhoneNumberAuthHelper?.hideLoginLoading() mPhoneNumberAuthHelper?.hideLoginLoading()
} }
}, { }, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}")
ToastUtil.toastShort(it.message) ToastUtil.toastShort(it.message)
mPhoneNumberAuthHelper?.hideLoginLoading() mPhoneNumberAuthHelper?.hideLoginLoading()
}) })
......
...@@ -34,8 +34,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils ...@@ -34,8 +34,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.view.dialog.CommonDialog import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxAppTool import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxKeyboardTool import com.yidianling.common.tools.RxKeyboardTool
......
...@@ -7,9 +7,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut ...@@ -7,9 +7,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.StringUtils import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils import com.yidianling.user.StatusUtils
...@@ -111,8 +111,8 @@ class InputPassWordPresenterImpl : ...@@ -111,8 +111,8 @@ class InputPassWordPresenterImpl :
.doAfterTerminate { mView.showLoading(false) } .doAfterTerminate { mView.showLoading(false) }
.subscribe({ .subscribe({
if (it?.data == null) { if (it?.data == null) {
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}") .sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
ToastUtil.toastShort(it.msg) ToastUtil.toastShort(it.msg)
mView.startAnim() mView.startAnim()
} else { } else {
...@@ -132,13 +132,13 @@ class InputPassWordPresenterImpl : ...@@ -132,13 +132,13 @@ class InputPassWordPresenterImpl :
} }
mView.closeActivity() mView.closeActivity()
} }
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功")
} }
}, { }, {
YdlCommonOut.showToast(it.message!!) YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}") .sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
}) })
} }
......
...@@ -9,9 +9,9 @@ import com.ydl.ydlcommon.mvp.base.BasePresenter ...@@ -9,9 +9,9 @@ import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils import com.yidianling.user.StatusUtils
...@@ -91,21 +91,21 @@ class LoginPresenterImpl(view: ILoginContract.View) : ...@@ -91,21 +91,21 @@ class LoginPresenterImpl(view: ILoginContract.View) :
) )
} }
mView.autoLoginSuccess() mView.autoLoginSuccess()
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功") .sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功")
} else { } else {
// ToastUtil.toastShort(it.msg) // ToastUtil.toastShort(it.msg)
mView.aliAuthFailed() mView.aliAuthFailed()
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}") .sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}")
} }
}, { }, {
//走验证码、密码登录 //走验证码、密码登录
mView.aliAuthFailed() mView.aliAuthFailed()
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}") .sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}")
}) })
} }
...@@ -263,14 +263,14 @@ class LoginPresenterImpl(view: ILoginContract.View) : ...@@ -263,14 +263,14 @@ class LoginPresenterImpl(view: ILoginContract.View) :
if (media == SHARE_MEDIA.QQ) "qq" else "weixin" if (media == SHARE_MEDIA.QQ) "qq" else "weixin"
) )
LogHelper.getInstance().writeLogSync(media.getName() + "登录成功") LogHelper.getInstance().writeLogSync(media.getName() + "登录成功")
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功") .sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功")
}, { }, {
mView.dismissProgressView() mView.dismissProgressView()
YdlCommonOut.showToast(it.message!!) YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败") .sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
}) })
} }
......
...@@ -14,8 +14,8 @@ import android.widget.LinearLayout ...@@ -14,8 +14,8 @@ import android.widget.LinearLayout
import com.alipay.sdk.app.PayTask import com.alipay.sdk.app.PayTask
import com.tencent.mm.opensdk.modelpay.PayReq import com.tencent.mm.opensdk.modelpay.PayReq
import com.tencent.mm.opensdk.openapi.WXAPIFactory import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.RxImageTool import com.yidianling.common.tools.RxImageTool
import com.yidianling.ydl_pay.R import com.yidianling.ydl_pay.R
import com.yidianling.ydl_pay.common.bean.* import com.yidianling.ydl_pay.common.bean.*
...@@ -211,7 +211,7 @@ class CommonPayDialog : Dialog { ...@@ -211,7 +211,7 @@ class CommonPayDialog : Dialog {
private fun getOrderInfo() { private fun getOrderInfo() {
if (!NetUtils.isConnected(activity)) { if (!NetUtils.isConnected(activity)) {
ToastHelper.show(activity, activity.getString(R.string.net_error)) ToastHelper.show(activity, activity.getString(R.string.net_error))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,无网络") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,无网络")
// progress.visibility = View.GONE // progress.visibility = View.GONE
dismissProgressDialog() dismissProgressDialog()
return return
...@@ -230,18 +230,18 @@ class CommonPayDialog : Dialog { ...@@ -230,18 +230,18 @@ class CommonPayDialog : Dialog {
progress_layout.visibility = View.GONE progress_layout.visibility = View.GONE
view_pager.visibility = View.VISIBLE view_pager.visibility = View.VISIBLE
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,成功")
updateDataOnView(it.data) updateDataOnView(it.data)
} else { } else {
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}") .sendRichLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}")
ToastHelper.show(activity, it.msg) ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE // progress.visibility = View.GONE
} }
} else { } else {
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}") .sendRichLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}")
ToastHelper.show(activity, it.msg) ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE // progress.visibility = View.GONE
} }
...@@ -249,8 +249,8 @@ class CommonPayDialog : Dialog { ...@@ -249,8 +249,8 @@ class CommonPayDialog : Dialog {
dismissProgressDialog() dismissProgressDialog()
// progress.visibility = View.GONE // progress.visibility = View.GONE
ToastHelper.show(activity, e.message!!) ToastHelper.show(activity, e.message!!)
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}") .sendRichLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}")
}) })
} }
...@@ -436,7 +436,7 @@ class CommonPayDialog : Dialog { ...@@ -436,7 +436,7 @@ class CommonPayDialog : Dialog {
} }
bean.orderType = payBusinessType.toString() bean.orderType = payBusinessType.toString()
bean.payType = useMoneyType.toString() bean.payType = useMoneyType.toString()
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"创建订单,支付方式payWay:$payWay---payMoney:$payMoney----useMoneyType:$useMoneyType" "创建订单,支付方式payWay:$payWay---payMoney:$payMoney----useMoneyType:$useMoneyType"
) )
...@@ -449,7 +449,7 @@ class CommonPayDialog : Dialog { ...@@ -449,7 +449,7 @@ class CommonPayDialog : Dialog {
if (it.code == 200) { if (it.code == 200) {
if (it.data != null) { if (it.data != null) {
if (it.data.payStatus) { if (it.data.payStatus) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"创建订单,支付成功" "创建订单,支付成功"
) )
...@@ -494,7 +494,7 @@ class CommonPayDialog : Dialog { ...@@ -494,7 +494,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun getAliPayOrderId(payId: String, isThreePay: Int) { private fun getAliPayOrderId(payId: String, isThreePay: Int) {
if (!NetUtils.isConnected(activity)) { if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:无网络" "支付宝支付:无网络"
) )
...@@ -509,13 +509,13 @@ class CommonPayDialog : Dialog { ...@@ -509,13 +509,13 @@ class CommonPayDialog : Dialog {
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.subscribe({ .subscribe({
if (it.data != null) { if (it.data != null) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:无网络" "支付宝支付:无网络"
) )
aliPay(it.data.aliSign) aliPay(it.data.aliSign)
} else { } else {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:data = null msg: ${it.msg} " "支付宝支付:data = null msg: ${it.msg} "
) )
...@@ -525,7 +525,7 @@ class CommonPayDialog : Dialog { ...@@ -525,7 +525,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog() dismissProgressDialog()
} }
}, { }, {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:error message: ${it.message} localizedMessage: ${it.localizedMessage}" "支付宝支付:error message: ${it.message} localizedMessage: ${it.localizedMessage}"
) )
...@@ -541,7 +541,7 @@ class CommonPayDialog : Dialog { ...@@ -541,7 +541,7 @@ class CommonPayDialog : Dialog {
val result = alipay.payV2(aliSign, true) val result = alipay.payV2(aliSign, true)
val payResult = PayResult(result) val payResult = PayResult(result)
if ("9000" == payResult.resultStatus) { if ("9000" == payResult.resultStatus) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:支付成功" "支付宝支付:支付成功"
) )
...@@ -552,7 +552,7 @@ class CommonPayDialog : Dialog { ...@@ -552,7 +552,7 @@ class CommonPayDialog : Dialog {
} }
dismissProgressDialog() dismissProgressDialog()
} else { } else {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"支付宝支付:resultStatus != 9000 memo${payResult.memo} " "支付宝支付:resultStatus != 9000 memo${payResult.memo} "
) )
...@@ -569,7 +569,7 @@ class CommonPayDialog : Dialog { ...@@ -569,7 +569,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun getWeiXinPayOrderId(payId: String, isThreePay: Int, merchantType: String) { private fun getWeiXinPayOrderId(payId: String, isThreePay: Int, merchantType: String) {
if (!NetUtils.isConnected(activity)) { if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"微信支付,无网络" "微信支付,无网络"
) )
...@@ -586,7 +586,7 @@ class CommonPayDialog : Dialog { ...@@ -586,7 +586,7 @@ class CommonPayDialog : Dialog {
if (it.data != null) { if (it.data != null) {
weixinPay(it.data.option) weixinPay(it.data.option)
} else { } else {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"微信支付data=null ${it.msg}" "微信支付data=null ${it.msg}"
) )
...@@ -596,7 +596,7 @@ class CommonPayDialog : Dialog { ...@@ -596,7 +596,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog() dismissProgressDialog()
} }
}, { }, {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"微信支付,异常:message:${it.message}----localizedMessage:${it.localizedMessage}" "微信支付,异常:message:${it.message}----localizedMessage:${it.localizedMessage}"
) )
...@@ -633,7 +633,7 @@ class CommonPayDialog : Dialog { ...@@ -633,7 +633,7 @@ class CommonPayDialog : Dialog {
.subscribe({ .subscribe({
dismissProgressDialog() dismissProgressDialog()
if (it.data != null && it.code == 0) { if (it.data != null && it.code == 0) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"余额支付:成功" "余额支付:成功"
) )
...@@ -642,7 +642,7 @@ class CommonPayDialog : Dialog { ...@@ -642,7 +642,7 @@ class CommonPayDialog : Dialog {
dismiss() dismiss()
} }
} else { } else {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"余额支付:失败 msg:${it.msg}" "余额支付:失败 msg:${it.msg}"
) )
...@@ -651,7 +651,7 @@ class CommonPayDialog : Dialog { ...@@ -651,7 +651,7 @@ class CommonPayDialog : Dialog {
} }
} }
}, { }, {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"余额支付:ERROR message:${it.message} localizedMessage: ${it.localizedMessage}" "余额支付:ERROR message:${it.message} localizedMessage: ${it.localizedMessage}"
) )
...@@ -666,7 +666,7 @@ class CommonPayDialog : Dialog { ...@@ -666,7 +666,7 @@ class CommonPayDialog : Dialog {
fun onEvent(event: WeiXinPayStatusEvent) { fun onEvent(event: WeiXinPayStatusEvent) {
dismissProgressDialog() dismissProgressDialog()
if (event.success) { if (event.success) {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"微信支付成功" "微信支付成功"
) )
...@@ -674,7 +674,7 @@ class CommonPayDialog : Dialog { ...@@ -674,7 +674,7 @@ class CommonPayDialog : Dialog {
listener!!.onSuccesed() listener!!.onSuccesed()
dismiss() dismiss()
} else { } else {
AliYunLogHelper.getInstance().sendLog( AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY, AliYunLogConfig.PAY,
"微信支付:失败 msg:${event.msg}" "微信支付:失败 msg:${event.msg}"
) )
......
...@@ -18,9 +18,9 @@ import com.ydl.ydlcommon.data.PlatformDataManager ...@@ -18,9 +18,9 @@ import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.service.IImService import com.yidianling.im.api.service.IImService
...@@ -553,7 +553,7 @@ class PayActivity : BaseActivity() { ...@@ -553,7 +553,7 @@ class PayActivity : BaseActivity() {
* 点击支付 * 点击支付
*/ */
private fun onClickPay() { private fun onClickPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "点击支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "点击支付")
when (inlet) { when (inlet) {
INLET_NORMAL -> { INLET_NORMAL -> {
//正常入口 //正常入口
...@@ -619,7 +619,7 @@ class PayActivity : BaseActivity() { ...@@ -619,7 +619,7 @@ class PayActivity : BaseActivity() {
if (null == payParams) { if (null == payParams) {
return return
} }
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select")
HttpUtils.recharge(RechargeParam(payParams!!.needPay.toInt().toString())) HttpUtils.recharge(RechargeParam(payParams!!.needPay.toInt().toString()))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -639,7 +639,7 @@ class PayActivity : BaseActivity() { ...@@ -639,7 +639,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") } .doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() } .doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer { .subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功") LogHelper.getInstance().writeLogSync("支付成功")
ToastUtil.toastShort("支付成功") ToastUtil.toastShort("支付成功")
...@@ -652,7 +652,7 @@ class PayActivity : BaseActivity() { ...@@ -652,7 +652,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) { override fun accept(msg: String) {
ToastUtil.toastShort(msg) ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败$msg") LogHelper.getInstance().writeLogSync("支付失败$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败$msg") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败$msg")
} }
}) })
...@@ -665,18 +665,18 @@ class PayActivity : BaseActivity() { ...@@ -665,18 +665,18 @@ class PayActivity : BaseActivity() {
when (inlet) { when (inlet) {
INLET_NORMAL -> { INLET_NORMAL -> {
//正常入口 //正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 正常入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 正常入口")
balancePayById(payParams!!.payId) balancePayById(payParams!!.payId)
} }
INLET_TEST -> { INLET_TEST -> {
//测评入口 //测评入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 测评入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 测评入口")
balancePayById(testAddOrderBean!!.payId!!) balancePayById(testAddOrderBean!!.payId!!)
} }
else -> { else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付")
balancePayById(payParams!!.payId) balancePayById(payParams!!.payId)
} }
...@@ -700,7 +700,7 @@ class PayActivity : BaseActivity() { ...@@ -700,7 +700,7 @@ class PayActivity : BaseActivity() {
.doAfterTerminate { dismissProgressDialog() } .doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer { .subscribe(Consumer {
LogHelper.getInstance().writeLogSync("支付成功") LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付成功")
ToastUtil.toastShort("支付成功") ToastUtil.toastShort("支付成功")
setResult(Activity.RESULT_OK) setResult(Activity.RESULT_OK)
finish() finish()
...@@ -708,7 +708,7 @@ class PayActivity : BaseActivity() { ...@@ -708,7 +708,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) { override fun accept(msg: String) {
ToastUtil.toastShort(msg) ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg") LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg")
} }
}) })
...@@ -719,7 +719,7 @@ class PayActivity : BaseActivity() { ...@@ -719,7 +719,7 @@ class PayActivity : BaseActivity() {
*/ */
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private fun appPay() { private fun appPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}")
Observable.just(select) Observable.just(select)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -737,7 +737,7 @@ class PayActivity : BaseActivity() { ...@@ -737,7 +737,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") } .doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() } .doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer { .subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功") LogHelper.getInstance().writeLogSync("支付成功")
setResult(Activity.RESULT_OK) setResult(Activity.RESULT_OK)
finish() finish()
...@@ -745,7 +745,7 @@ class PayActivity : BaseActivity() { ...@@ -745,7 +745,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) { override fun accept(msg: String) {
ToastUtil.toastShort(msg) ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg") LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败:$msg") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败:$msg")
} }
}) })
...@@ -758,20 +758,20 @@ class PayActivity : BaseActivity() { ...@@ -758,20 +758,20 @@ class PayActivity : BaseActivity() {
return when (inlet) { return when (inlet) {
INLET_NORMAL -> { INLET_NORMAL -> {
//正常入口 //正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:正常入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:正常入口")
wxPayById(payParams!!.payId, payParams?.merchantType.toString()) wxPayById(payParams!!.payId, payParams?.merchantType.toString())
} }
INLET_TEST -> { INLET_TEST -> {
//测评入口 //测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) { if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:测评入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:测评入口")
wxPayById(testAddOrderBean!!.payId!!, payParams?.merchantType.toString()) wxPayById(testAddOrderBean!!.payId!!, payParams?.merchantType.toString())
} else { } else {
null null
} }
} }
else -> { else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付")
wxPayById(payParams!!.payId, payParams?.merchantType.toString()) wxPayById(payParams!!.payId, payParams?.merchantType.toString())
} }
} }
...@@ -797,14 +797,14 @@ class PayActivity : BaseActivity() { ...@@ -797,14 +797,14 @@ class PayActivity : BaseActivity() {
return when (inlet) { return when (inlet) {
INLET_NORMAL -> { INLET_NORMAL -> {
//正常入口 //正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:正常入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:正常入口")
aliPayById(payParams!!.payId) aliPayById(payParams!!.payId)
} }
INLET_TEST -> { INLET_TEST -> {
//测评入口 //测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) { if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:测评入口") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:测评入口")
aliPayById(testAddOrderBean!!.payId!!) aliPayById(testAddOrderBean!!.payId!!)
} else { } else {
...@@ -812,7 +812,7 @@ class PayActivity : BaseActivity() { ...@@ -812,7 +812,7 @@ class PayActivity : BaseActivity() {
} }
} }
else -> { else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付")
aliPayById(payParams!!.payId) aliPayById(payParams!!.payId)
} }
......
...@@ -7,8 +7,8 @@ import com.tencent.mm.opensdk.constants.Build ...@@ -7,8 +7,8 @@ import com.tencent.mm.opensdk.constants.Build
import com.tencent.mm.opensdk.modelpay.PayReq import com.tencent.mm.opensdk.modelpay.PayReq
import com.tencent.mm.opensdk.openapi.WXAPIFactory import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.ydl.ydlcommon.data.http.CustomThrowable import com.ydl.ydlcommon.data.http.CustomThrowable
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.ydl_pay.common.bean.CommonWXPayBean import com.yidianling.ydl_pay.common.bean.CommonWXPayBean
import com.yidianling.ydl_pay.common.bean.PayResult import com.yidianling.ydl_pay.common.bean.PayResult
import com.yidianling.ydl_pay.pay.bean.PayStatus import com.yidianling.ydl_pay.pay.bean.PayStatus
...@@ -64,13 +64,13 @@ object RxPay { ...@@ -64,13 +64,13 @@ object RxPay {
"9000" == payResult.resultStatus -> { "9000" == payResult.resultStatus -> {
it.onNext(PayStatus(true)) it.onNext(PayStatus(true))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付成功")
} }
else -> { else -> {
it.onError(CustomThrowable(payResult.memo)) it.onError(CustomThrowable(payResult.memo))
AliYunLogHelper.getInstance() AliYunRichLogsHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}") .sendRichLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}")
} }
} }
......
...@@ -9,10 +9,10 @@ import android.support.v7.app.AlertDialog ...@@ -9,10 +9,10 @@ import android.support.v7.app.AlertDialog
import android.view.* import android.view.*
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.StringUtils import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.ydl_pay.R import com.yidianling.ydl_pay.R
import com.yidianling.ydl_pay.common.bean.params.AliPayParam import com.yidianling.ydl_pay.common.bean.params.AliPayParam
import com.yidianling.ydl_pay.common.bean.params.WxPayParam import com.yidianling.ydl_pay.common.bean.params.WxPayParam
...@@ -162,7 +162,7 @@ class PayDialog : Dialog { ...@@ -162,7 +162,7 @@ class PayDialog : Dialog {
if (data?.payId == null) { if (data?.payId == null) {
ToastHelper.show("支付id有误,请返回重试") ToastHelper.show("支付id有误,请返回重试")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付id有误,请返回重试") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付id有误,请返回重试")
return return
} }
...@@ -190,12 +190,12 @@ class PayDialog : Dialog { ...@@ -190,12 +190,12 @@ class PayDialog : Dialog {
this.callBack?.onSuccess() this.callBack?.onSuccess()
} }
LogHelper.getInstance().writeLogSync("支付成功") LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付成功") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付成功")
this.callBack?.onSuccess() this.callBack?.onSuccess()
dismiss() dismiss()
}, { }, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付失败:${it.message}") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
ToastHelper.show(it.message ?: "支付失败") ToastHelper.show(it.message ?: "支付失败")
LogHelper.getInstance().writeLogSync("支付失败:${it.message}") LogHelper.getInstance().writeLogSync("支付失败:${it.message}")
}) })
...@@ -206,7 +206,7 @@ class PayDialog : Dialog { ...@@ -206,7 +206,7 @@ class PayDialog : Dialog {
* @param payId 支付id * @param payId 支付id
*/ */
private fun wxPayById(payId: String,merchantType:String): Observable<PayStatus> { private fun wxPayById(payId: String,merchantType:String): Observable<PayStatus> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"微信支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"微信支付")
val bean = WxPayParam(payId, 1,merchantType) val bean = WxPayParam(payId, 1,merchantType)
return HttpUtils.wxPay(bean) return HttpUtils.wxPay(bean)
.compose(RxUtils.resultData()) .compose(RxUtils.resultData())
...@@ -219,7 +219,7 @@ class PayDialog : Dialog { ...@@ -219,7 +219,7 @@ class PayDialog : Dialog {
* @param payId 支付Id * @param payId 支付Id
*/ */
private fun aliPayById(payId: String): Observable<PayStatus> { private fun aliPayById(payId: String): Observable<PayStatus> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付宝支付") AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付宝支付")
var bean = AliPayParam(payId, 1) var bean = AliPayParam(payId, 1)
return HttpUtils.getAliPayOrderId(bean) return HttpUtils.getAliPayOrderId(bean)
......
...@@ -48,11 +48,11 @@ import com.ydl.ydlcommon.utils.LogUtil; ...@@ -48,11 +48,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetWorkSpeedUtils; import com.ydl.ydlcommon.utils.NetWorkSpeedUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils; import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.URLUtils; import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.view.TitleBar; import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLCommonDialog; import com.ydl.ydlcommon.view.dialog.YDLCommonDialog;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog; import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
import com.ydl.ydlnet.utils.log.AliYunLogConfig; import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.common.tools.RxDeviceTool; import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxImageTool; import com.yidianling.common.tools.RxImageTool;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
...@@ -376,7 +376,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -376,7 +376,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
rightText = getIntent().getStringExtra("rightText"); rightText = getIntent().getStringExtra("rightText");
if (h5Params == null) { if (h5Params == null) {
ToastUtil.toastShort("参数错误"); ToastUtil.toastShort("参数错误");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.WEB, "参数错误 Params == null"); AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.WEB, "参数错误 Params == null");
finish(); finish();
return; return;
} }
...@@ -691,8 +691,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -691,8 +691,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
safeTipView.setLocation("orderList"); safeTipView.setLocation("orderList");
} }
if (title.contains("404") || title.contains("500") || title.contains("Error")) { if (title.contains("404") || title.contains("500") || title.contains("Error")) {
AliYunLogHelper.Companion.getInstance() AliYunRichLogsHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title); .sendRichLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title);
} }
} }
...@@ -784,8 +784,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -784,8 +784,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override @Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl); super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance() AliYunRichLogsHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl); .sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
loadFailed = true; loadFailed = true;
tb_title.setTitle("加载中"); tb_title.setTitle("加载中");
if (wv_content != null) { if (wv_content != null) {
...@@ -895,8 +895,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -895,8 +895,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override @Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl); super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance() AliYunRichLogsHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl); .sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
tb_title.setTitle("加载中"); tb_title.setTitle("加载中");
loadFailed = true; loadFailed = true;
if (wv_content != null) { if (wv_content != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment