Commit 018badf8 by 刘鹏

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

parent cb4f68c6
......@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68",
"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-im" : "0.0.18.46",
"m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -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-pay" : "0.0.18.16",
"m-audioim" : "0.0.49.29.34",
"ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......@@ -88,12 +88,12 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.04",
"m-confide" : "0.0.49.05",
"m-consultant" : "0.0.59.68",
"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-im" : "0.0.18.46",
"m-im" : "0.0.18.47",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -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-pay" : "0.0.18.16",
"m-audioim" : "0.0.49.29.34",
"ydl-pay" : "0.0.18.17",
"m-audioim" : "0.0.49.29.35",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......
......@@ -50,10 +50,10 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
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.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
......@@ -214,8 +214,8 @@ class AudioHomeActivity :
uploadException("mRtcEventHandler-onWarning:warnCode--%${warn}", callback = null)
LogUtil.e("[agora]发生警告回调$warn")
writeAgoraLog("声网警告回调($warn)")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网警告回调($warn)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网警告回调($warn)")
//103:没有可用的频道资源。可能是因为服务端没法分配频道资源
//104:查找频道超时。在加入频道时 SDK 先要查找指定的频道,出现该警告一般是因为网络太差,连接不到服务器
//105:查找频道请求被服务器拒绝。服务器可能没有办法处理这个请求或请求是非法的
......@@ -244,8 +244,8 @@ class AudioHomeActivity :
super.onError(err)
uploadException("mRtcEventHandler-onError:errorCode--%${err}", callback = null)
writeAgoraLog("声网错误回调errorCode--%${err}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
//3:SDK 初始化失败。Agora 建议尝试以下处理方法
//7:SDK 尚未初始化,就调用其 API。请确认在调用 API 之前已创建 RtcEngine 对象并完成初始化
//10:API 调用超时。有些 API 调用需要 SDK 返回结果,如果 SDK 处理时间过长,超过 10 秒没有返回,会出现此错误
......@@ -289,15 +289,16 @@ class AudioHomeActivity :
override fun onApiCallExecuted(error: Int, api: String?, result: String?) {
super.onApiCallExecuted(error, api, result)
// LogUtil.e("[agora]$api 已执行回调 $result")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "$api 已执行回调 $result")
//注销原因,产生大量无效数据,会被频繁调用
// AliYunRichLogsHelper.getInstance()
// .sendLog(AliYunLogConfig.AGORA, "$api 已执行回调 $result")
}
override fun onJoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) {
super.onJoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 用户声网加入频道成功:channel=$channel")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "$uid 用户声网加入频道成功:channel=$channel")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "$uid 用户声网加入频道成功:channel=$channel")
//更新ui
// onJoinChannelSuccess()
......@@ -313,8 +314,8 @@ class AudioHomeActivity :
override fun onRejoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) {
super.onRejoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 用户声网重新加入频道成功:channel=$channel")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "$uid 用户声网重新加入频道成功:channel=$channel")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "$uid 用户声网重新加入频道成功:channel=$channel")
runOnUiThread {
//自己加入频道成功
if (!isConnectSuccess) {
......@@ -328,8 +329,8 @@ class AudioHomeActivity :
override fun onRtcStats(stats: IRtcEngineEventHandler.RtcStats?) {
super.onRtcStats(stats)
writeAgoraLog("声网onRtcStats:users:${stats?.users}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网onRtcStats:users:${stats?.users}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网onRtcStats:users:${stats?.users}")
// 不需要移动端做离开房间逻辑,服务端会判断进行踢人逻辑
//因为用户端直接加入了频道,防止该回调执行时,专家还未加入频道,因此在连接成功之后,才进行频道人数判断
// if (isConnectSuccess && null != stats?.users && stats.users == 1) {
......@@ -346,8 +347,8 @@ class AudioHomeActivity :
// 3 网络连接被服务器中止 该情况现在是因为后端踢人逻辑
if (reason == 3) {
writeAgoraLog("通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason})")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason})")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "通话结束:网络连接被服务器中止 该情况现在是因为后端踢人逻辑,原因(${reason})")
// com.yidianling.common.tools.ToastUtil.toastShort("专家已挂断")
//通话结束或挂断时,上传日志文件
uploadLog()
......@@ -359,8 +360,8 @@ class AudioHomeActivity :
override fun onLeaveChannel(stats: IRtcEngineEventHandler.RtcStats?) {
super.onLeaveChannel(stats)
LogUtil.e("[agora]离开频道回调")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "离开频道回调")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "离开频道回调")
//通话结束或挂断时,上传日志文件
uploadLog()
}
......@@ -369,16 +370,16 @@ class AudioHomeActivity :
override fun onUserJoined(uid: Int, elapsed: Int) {
super.onUserJoined(uid, elapsed)
LogUtil.e("[agora]远端用户/主播加入频道回调")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "远端用户/主播加入频道回调")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "远端用户/主播加入频道回调")
}
override fun onUserOffline(uid: Int, elapsed: Int) {
super.onUserOffline(uid, elapsed)
LogUtil.e("[agora]远端用户$uid 离开频道回调")
writeAgoraLog("接通后通话结束:对方已挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "接通后通话结束:对方已挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "接通后通话结束:对方已挂断")
//通话结束或挂断时,上传日志文件
uploadLog()
showToast("专家已挂断")
......@@ -452,8 +453,8 @@ class AudioHomeActivity :
//页面传递数据初始化
initIntentData()
writeAgoraLog("通话页面打开的时候,RTM登录状态码:${YDLavManager.sdkStatus}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.RTM, "通话页面打开的时候,RTM登录状态码:${YDLavManager.sdkStatus}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.RTM, "通话页面打开的时候,RTM登录状态码:${YDLavManager.sdkStatus}")
if (YDLavManager.sdkStatus != Constants.CONNECTION_STATE_CONNECTED) {
//再次登录声网,确保声网登录状态
reLoginRTM()
......@@ -510,8 +511,8 @@ class AudioHomeActivity :
commentUrl = intent.getStringExtra(IntentConstants.INTENT_COMMENT_URL)
dialStatus = intent.getStringExtra(IntentConstants.INTENT_DIALSTATUS)
writeAgoraLog("专家的通话状态dialStatus:$dialStatus", false)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "专家的通话状态dialStatus:$dialStatus")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "专家的通话状态dialStatus:$dialStatus")
isShowAXB = intent.getBooleanExtra(IntentConstants.INTENT_ISSHOWAXB, true)
val logBean = AgoraLogInfoBean(
......@@ -526,8 +527,8 @@ class AudioHomeActivity :
)
val content = Gson().toJson(logBean)
writeAgoraLog("主叫方发送的邀请通话消息内容:$content", true)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content")
localRemainTime = remainTime?.toInt()
handler = Handler()
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
......@@ -535,8 +536,8 @@ class AudioHomeActivity :
private fun reLoginRTM() {
writeAgoraLog("RMT状态:${YDLavManager.sdkStatus},重新登录RMT")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.RTM, "RMT状态:${YDLavManager.sdkStatus},重新登录RMTt")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.RTM, "RMT状态:${YDLavManager.sdkStatus},重新登录RMTt")
val uid = YdlCommonRouterManager.getYdlCommonRoute().getUid().toString()
YDLavManager.instances.login(uid) { _isSuccess, _msg ->
// writeAgoraLog("拨打电话界面打开RTM重新登录,uid=${uid}")
......@@ -547,8 +548,8 @@ class AudioHomeActivity :
private fun initView() {
writeAgoraLog("用户拨打电话界面开启")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "用户拨打电话界面开启")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "用户拨打电话界面开启")
tv_change_route.isEnabled = false
//水波纹view初始化
wave_view.setDuration(6000)
......@@ -594,8 +595,8 @@ class AudioHomeActivity :
}
if (isConnectSuccess) {
writeAgoraLog("已接通:主叫主动挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "已接通:主叫主动挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "已接通:主叫主动挂断")
updateExpertStatus(false, 1)
leaveChannel()
uploadLog()
......@@ -644,8 +645,8 @@ class AudioHomeActivity :
when {
permission.granted -> {
writeAgoraLog("请求音频权限通过")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "请求音频权限通过")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "请求音频权限通过")
init()
}
permission.shouldShowRequestPermissionRationale -> {
......@@ -655,8 +656,8 @@ class AudioHomeActivity :
// 拒绝权限操作发送给服务端
uploadException("AudioNotAuth","zhu",YDLavManager.AUDIO_NO_AUTH_ERROR_CODE,null)
writeAgoraLog("拒绝请求音频权限")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "拒绝请求音频权限")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
......@@ -719,8 +720,8 @@ class AudioHomeActivity :
//关闭音乐
stopPlaying()
writeAgoraLog("未接通挂断:50s等待倒计时结束挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "未接通挂断:50s等待倒计时结束挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "未接通挂断:50s等待倒计时结束挂断")
//提示切换传统线路
//发送消息通知专家用户已挂断
YDLavManager.instances.cancelCall(
......@@ -729,8 +730,8 @@ class AudioHomeActivity :
sendDoctocrMsg!!
) { msg, code ->
writeAgoraLog("未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
}
//通话结束或挂断时,上传日志文件
uploadLog()
......@@ -766,8 +767,8 @@ class AudioHomeActivity :
*/
fun joinChannel() {
writeAgoraLog("对方(专家)接受了通话邀请,主叫(用户)开始加入频道:$channelId")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "对方(专家)接受了通话邀请,主叫(用户)开始加入频道:$channelId")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "对方(专家)接受了通话邀请,主叫(用户)开始加入频道:$channelId")
voiceManage!!.getVoiceApi().joinChannel(
token!!,
channelId!!,
......@@ -783,8 +784,8 @@ class AudioHomeActivity :
*/
private fun userCloseCalling() {
writeAgoraLog("未接听时:主叫(用户)主动挂断,取消呼叫")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断,取消呼叫")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断,取消呼叫")
LogUtil.e("未接听挂断")
//发送消息通知专家用户已挂断
YDLavManager.instances.cancelCall(
......@@ -793,8 +794,8 @@ class AudioHomeActivity :
sendDoctocrMsg!!
) { msg, code ->
writeAgoraLog("未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "未接听时:主叫(用户)主动挂断失败,msg=$msg($code),再次挂断")
}
//通话结束或挂断时,上传日志文件
uploadLog()
......@@ -840,8 +841,8 @@ class AudioHomeActivity :
val dialog = AxbConfirmDialog(mContext, type, object : AxbConfirmDialog.OnClickEnsureListener {
override fun onClickEnsure() {
writeAgoraLog("主叫点击切换AXB按钮")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "主叫点击切换AXB按钮")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "主叫点击切换AXB按钮")
switchAXB()
}
......@@ -864,8 +865,8 @@ class AudioHomeActivity :
uploadException("", "zhu", "108", object : YDLavManager.UploadExceptionCallback {
override fun onSuccess() {
writeAgoraLog("离开房间成功,主叫切换AXB之后")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "离开房间成功,主叫切换AXB之后")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "离开房间成功,主叫切换AXB之后")
mPresenter.getAXBPhone(ConnectCommand(listenId!!, "1"))
}
......@@ -899,8 +900,8 @@ class AudioHomeActivity :
sendDoctocrMsg!!
) { msg, code ->
writeAgoraLog("未接听时:主叫主动挂断失败,msg=$msg($code),再次挂断")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "未接听时:主叫主动挂断失败,msg=$msg($code),再次挂断")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "未接听时:主叫主动挂断失败,msg=$msg($code),再次挂断")
}
leaveChannel()
}
......
......@@ -25,9 +25,9 @@ import com.ydl.ydl_av.messge_service.response.CallRemoteResponse
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
......@@ -92,7 +92,7 @@ class YDLavManager {
override fun onCallRecivedByPeer(response: CallLocalResponse?) {
//返回给主叫:被叫已收到呼叫邀请
LogUtil.e("[agora]${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}"
)
......@@ -109,7 +109,7 @@ class YDLavManager {
override fun onCallAccepted(response: CallLocalResponse?, msg: String?) {
//返回给主叫
LogUtil.e("[agora]${response?.calleeId}已接收呼叫邀请")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"${response?.calleeId}已接收呼叫邀请"
)
......@@ -125,7 +125,7 @@ class YDLavManager {
override fun onCallRefused(response: CallLocalResponse?, msg: String?) {
//返回给主叫
LogUtil.e("[agora]${response?.calleeId}已拒绝呼叫邀请")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"${response?.calleeId}已拒绝呼叫邀请"
)
......@@ -146,7 +146,7 @@ class YDLavManager {
override fun onCallCanceled(response: CallLocalResponse?) {
//返回给主叫
LogUtil.e("[agora]主叫已取消呼叫邀请")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"主叫已取消呼叫邀请"
)
......@@ -162,7 +162,7 @@ class YDLavManager {
override fun onCallFailure(response: CallLocalResponse?, errorCode: Int) {
//返回给主叫
LogUtil.e("[agora]呼叫${response?.calleeId}用户失败:${response?.response}")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"呼叫${response?.calleeId}用户失败:${response?.response}"
)
......@@ -193,7 +193,7 @@ class YDLavManager {
override fun onRemoteInvitationReceived(response: CallRemoteResponse?) {
//返回给被叫
LogUtil.e("[agora]收到来自${response?.callerId}的呼叫邀请")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"收到来自${response?.callerId}的呼叫邀请"
)
......@@ -203,7 +203,7 @@ class YDLavManager {
override fun onRemoteInvitationAccepted(response: CallRemoteResponse?) {
//返回给被叫
LogUtil.e("[agora]接受来自${response?.callerId}的呼叫成功")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"接受来自${response?.callerId}的呼叫成功"
)
......@@ -212,7 +212,7 @@ class YDLavManager {
override fun onRemoteInvitationRefused(response: CallRemoteResponse?) {
//返回给被叫
LogUtil.e("[agora]已拒绝来自${response?.callerId}的呼叫")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"已拒绝来自${response?.callerId}的呼叫"
)
......@@ -226,7 +226,7 @@ class YDLavManager {
callEndStatusUpdate(response?.ChannelId!!, 1, "主叫取消呼叫")
//返回给被叫
LogUtil.e("[agora]主叫${response?.callerId}已取消呼叫邀请")
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"主叫${response?.callerId}已取消呼叫邀请"
)
......@@ -247,7 +247,7 @@ class YDLavManager {
//返回给被叫
LogUtil.e("[agora]来自主叫${response?.callerId}的呼叫邀请进程失败:${response?.response}")
if (errorCode == RtmStatusCode.RemoteInvitationError.REMOTE_INVITATION_ERR_INVITATION_EXPIRE) { //呼叫邀请过期
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"呼叫邀请被取消:用户未接听"
)
......@@ -263,7 +263,7 @@ class YDLavManager {
writeAgoraLog(
"呼叫邀请被取消:错误原因(${errorCode})", FILE_NAME
)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"呼叫邀请被取消:错误原因(${errorCode})"
)
......@@ -281,7 +281,7 @@ class YDLavManager {
"confide.log",
true
)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"声网发送通话邀请成功"
)
......@@ -294,7 +294,7 @@ class YDLavManager {
}", "confide.log", true
)
LogHelper.getInstance().uploadLog(false)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"声网发送通话邀请失败${error}"
)
......@@ -410,7 +410,7 @@ class YDLavManager {
override fun onException(throwable: Throwable) {
// writeAgoraLog("云信发送通话邀请异常${throwable.message}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}", "confide.log", true)
// LogHelper.getInstance().uploadLog(false)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.YUNXIN,
"云信发送通话邀请异常${throwable.message}"
)
......@@ -419,7 +419,7 @@ class YDLavManager {
override fun onFailed(code: Int) {
// writeAgoraLog("云信发送通话邀请失败${code}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}", "confide.log", true)
// LogHelper.getInstance().uploadLog(false)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.YUNXIN,
"云信发送通话邀请失败${code}"
)
......@@ -431,7 +431,7 @@ class YDLavManager {
"confide.log",
true
)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.YUNXIN,
"云信发送通话邀请成功"
)
......@@ -451,7 +451,7 @@ class YDLavManager {
if (TextUtils.isEmpty(userId) || userId ?: "0" <= "0") {
//如果uid为空或小于等于0 ,则不进行登录,因为uid为0也会登录成功,会导致后面uid正确时无法登录
LogUtil.e("[agora]login-uid:$userId")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA,"uid为空或小于等于0 ,则不进行登录 login-uid:$userId")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA,"uid为空或小于等于0 ,则不进行登录 login-uid:$userId")
return
}
isOnlineRtm = true
......@@ -467,8 +467,8 @@ class YDLavManager {
override fun onSuccess() {
//登陆成功,发起呼叫
LogUtil.e("[agora]实时消息登录成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网rtm登录成功,uid:$userId")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网rtm登录成功,uid:$userId")
writeAgoraLog(
"声网rtm登录成功,uid:$userId-------Time:${
AudioLogUtils.format.format(
......@@ -488,8 +488,8 @@ class YDLavManager {
)
}", "confide.log", true
)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网rtm登录失败:$msg")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网rtm登录失败:$msg")
event(false, msg)
}
......@@ -498,7 +498,7 @@ class YDLavManager {
LogUtil.e("声网token获取失败uid:" + userId + " error:" + it.msg)
LogHelper.getInstance()
.writeLogSync("声网token获取失败uid:" + userId + " error:" + it.msg)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"声网token获取失败uid" + userId + " error:" + it.msg
)
......@@ -506,7 +506,7 @@ class YDLavManager {
}
}, {
LogUtil.e("声网token获取异常uid:" + userId + " error:" + it.message)
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.AGORA,
"声网token获取异常uid:" + userId + " error:" + it.message
)
......@@ -536,8 +536,8 @@ class YDLavManager {
)
}", FILE_NAME, false
)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请($from)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请($from)")
LogHelper.getInstance().uploadLog(false)
//邀请加入频道消息,跳转通话界面
......@@ -554,8 +554,8 @@ class YDLavManager {
}", FILE_NAME, false
)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请,但界面实例已存在($from)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请,但界面实例已存在($from)")
LogHelper.getInstance().uploadLog(false)
}
} else {
......@@ -567,8 +567,8 @@ class YDLavManager {
)
}", FILE_NAME, false
)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请,但response==null($from)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "收到主叫方通话邀请,但response==null($from)")
LogHelper.getInstance().uploadLog(false)
}
}
......@@ -605,8 +605,8 @@ class YDLavManager {
override fun onSuccess() {
//退出登陆成功
LogUtil.d("[agora]实时消息退出成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "实时消息退出成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "实时消息退出成功")
if (isReLogin) {
login(
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid
......@@ -616,8 +616,8 @@ class YDLavManager {
override fun onFailure(msg: String?) {
LogUtil.d("[agora]实时消息退出失败:$msg")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "实时消息退出失败:$msg")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "实时消息退出失败:$msg")
}
})
}
......@@ -643,8 +643,8 @@ class YDLavManager {
callback?.onSuccess()
}, {
LogUtil.e("agora", "声网上传异常与错误日志接口调用失败:" + it.message)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网上传异常与错误日志接口调用失败: + ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网上传异常与错误日志接口调用失败: + ${it.message}")
})
}
......@@ -665,8 +665,8 @@ class YDLavManager {
}, {
LogUtil.d("callEndStatusUpdate error: ${it.message}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "callEndStatusUpdate error: ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "callEndStatusUpdate error: ${it.message}")
})
}
......@@ -676,8 +676,8 @@ class YDLavManager {
private val listener = object : InitListener {
override fun onTokenExpired() {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "onTokenExpired")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "onTokenExpired")
LogUtil.e("[agora]onTokenExpired")
instances.login(
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid
......@@ -686,8 +686,8 @@ class YDLavManager {
override fun onMessageReceived(message: RTMMesssage, userId: Int) {
LogUtil.i("[agora]onMessageReceived:${message.text} -->uid:$userId")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "onMessageReceived:${message.text} -->uid:$userId")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "onMessageReceived:${message.text} -->uid:$userId")
}
override fun onConnectionStateChanged(state: Int, reason: Int) {
......@@ -698,8 +698,8 @@ class YDLavManager {
true
)
LogUtil.i("[agora]onConnectionStateChanged:state:${state} -->reason:$reason")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "声网rtm登录状态:${state}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "声网rtm登录状态:${state}")
/*
* 当reason=CONNECTION_CHANGE_REASON_REMOTE_LOGIN的时候,是远端用户以相同UID登录RTM
* 如果正在通话中,则不进行退出操作
......
......@@ -47,10 +47,10 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
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.remind.ToastHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.user.api.service.IUserService
import de.greenrobot.event.EventBus
import io.agora.rtc.Constants
......@@ -139,7 +139,7 @@ class ConsultantAudioHomeActivity :
super.onJoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 加入频道回调")
writeAgoraLog("被叫(用户)加入声网($channel)频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)加入声网($channel)频道成功")
runOnUiThread {
// 加入频道后再通知用户已接受
// YDLRTMClient.instances.acceptCall(mAudioMessageBean?.channelId)
......@@ -167,8 +167,8 @@ class ConsultantAudioHomeActivity :
super.onRejoinChannelSuccess(channel, uid, elapsed)
LogUtil.e("[agora]$uid 重新加入频道回调")
writeAgoraLog("被叫(用户)重新加入声网频道($channel)成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "被叫(用户)重新加入声网频道($channel)成功")
runOnUiThread {
if (!isConnectSuccess) {
......@@ -187,7 +187,7 @@ class ConsultantAudioHomeActivity :
super.onUserJoined(uid, elapsed)
LogUtil.e("[agora]远端用户加入频道回调")
writeAgoraLog("主叫(专家)加入声网频道成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "主叫(专家)加入声网频道成功")
//另一方加入频道成功
runOnUiThread {
......@@ -230,7 +230,7 @@ class ConsultantAudioHomeActivity :
override fun onLeaveChannel(stats: IRtcEngineEventHandler.RtcStats?) {
super.onLeaveChannel(stats)
LogUtil.e("[agora]自己离开频道回调")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "自己离开频道回调")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "自己离开频道回调")
//通知php 通话已结束
close(RESULT_ANSWERED_CODE, "")
......@@ -258,7 +258,7 @@ class ConsultantAudioHomeActivity :
)
showToast("对方已挂断")
writeAgoraLog("通话接通后挂断:主叫(专家)离开频道")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "通话接通后挂断:主叫(专家)离开频道")
if (null != totalDisposable) {
totalDisposable!!.dispose()
......@@ -276,7 +276,7 @@ class ConsultantAudioHomeActivity :
}
LogUtil.e("[agora]发生警告回调=$warn")
writeAgoraLog("声网警告回调码:($warn)")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网警告回调码:($warn)")
//103:没有可用的频道资源。可能是因为服务端没法分配频道资源
//104:查找频道超时。在加入频道时 SDK 先要查找指定的频道,出现该警告一般是因为网络太差,连接不到服务器
......@@ -303,7 +303,7 @@ class ConsultantAudioHomeActivity :
uploadException("mRtcEventHandler-onError:errorCode--%${err}")
LogUtil.e("[agora] 发生错误回调 =$err")
writeAgoraLog("声网错误回调errorCode--%${err}")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "声网错误回调errorCode--%${err}")
//3:SDK 初始化失败。Agora 建议尝试以下处理方法
//7:SDK 尚未初始化,就调用其 API。请确认在调用 API 之前已创建 RtcEngine 对象并完成初始化
......@@ -524,7 +524,7 @@ class ConsultantAudioHomeActivity :
override fun channelTokenResponse(token: String?, needJoinChannel: Boolean) {
if (TextUtils.isEmpty(token)) {
LogUtil.e("[agora]token not null")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "token isEmpty ")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "token isEmpty ")
showToast("通话频道不存在")
finish()
......@@ -599,7 +599,7 @@ class ConsultantAudioHomeActivity :
val account = YdlCommonRouterManager.getYdlCommonRoute().getUid()
if (!TextUtils.isEmpty(mAudioMessageBean?.channelId)) {
LogUtil.e("[agora] joinChannel:$account")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "joinChannel:$account")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "joinChannel:$account")
voiceManage?.getVoiceApi()?.joinChannel(
channelToken
......@@ -825,8 +825,8 @@ class ConsultantAudioHomeActivity :
fun close(code: Int, msg: String) {
runOnUiThread {
LogUtil.e("[agora]close(code:$code,msg:$msg)")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "close(code:$code,msg:$msg)")
//上传日志文件
uploadLog()
......@@ -858,7 +858,7 @@ class ConsultantAudioHomeActivity :
}
ActivityManager.getInstance().removeStack(activity = this)
LogUtil.e("[agora]页面移除")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.AGORA, "页面移除")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.AGORA, "页面移除")
finish()
}
}
......
......@@ -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.model.AVChatData;
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.AliYunLogHelper;
import com.yidianling.avchatkit.activity.AVChatActivity;
import com.yidianling.avchatkit.common.log.ILogUtil;
import com.yidianling.avchatkit.common.log.LogUtil;
......@@ -151,7 +151,7 @@ public class AVChatKit {
*/
public static void outgoingCall(Context context, String account, String displayName, int callType, int 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 {
*/
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);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"outgoingTeamCall 发起群组音视频通话呼叫");
}
/**
......
......@@ -26,8 +26,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatData;
import com.netease.nimlib.sdk.avchat.model.AVChatOnlineAckEvent;
import com.netease.nimlib.sdk.avchat.model.AVChatVideoFrame;
import com.tbruyelle.rxpermissions2.RxPermissions;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.AVChatProfile;
import com.yidianling.avchatkit.common.activity.AVChatBaseUI;
......@@ -349,15 +349,15 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
public void onJoinedChannel(int code, String audioFile, String videoFile, int i) {
LogUtil.d(TAG, "audioFile -> " + audioFile + " videoFile -> " + videoFile);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "audioFile -> " + audioFile + " videoFile -> " + videoFile);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "audioFile -> " + audioFile + " videoFile -> " + videoFile);
handleWithConnectServerResult(code);
}
@Override
public void onUserJoined(String account) {
LogUtil.d(TAG, "onUserJoin -> " + account);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "onUserJoin -> " + account);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "onUserJoin -> " + account);
if (state == AVChatType.VIDEO.getValue()) {
avChatVideoUI.initLargeSurfaceView(account);
......@@ -368,8 +368,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
public void onUserLeave(String account, int event) {
LogUtil.d(TAG, "onUserLeave -> " + account);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "onUserLeave -> " + account);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "onUserLeave -> " + account);
manualHangUp(AVChatExitCode.HANGUP);
finish();
}
......@@ -378,8 +378,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
public void onCallEstablished() {
LogUtil.d(TAG, "onCallEstablished");
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "onCallEstablished");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "onCallEstablished");
//移除超时监听
AVChatTimeoutObserver.getInstance().observeTimeoutNotification(timeoutObserver, false, mIsInComingCall);
if (avChatController.getTimeBase() == 0) {
......@@ -415,8 +415,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
avChatData = avChatController.getAvChatData();
if (avChatData != null && avChatData.getChatId() == avChatHangUpInfo.getChatId()) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "callHangupObserver 通话过程中,收到对方挂断电话");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "callHangupObserver 通话过程中,收到对方挂断电话");
hangUpByOther(AVChatExitCode.HANGUP);
cancelCallingNotifier();
// 如果是incoming call主叫方挂断,那么通知栏有通知
......@@ -435,16 +435,16 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
AVChatData info = avChatController.getAvChatData();
if (info != null && info.getChatId() == ackInfo.getChatId()) {
if (ackInfo.getEvent() == AVChatEventType.CALLEE_ACK_BUSY) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方正在忙");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方正在忙");
hangUpByOther(AVChatExitCode.PEER_BUSY);
} else if (ackInfo.getEvent() == AVChatEventType.CALLEE_ACK_REJECT) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方拒绝通话");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方拒绝通话");
hangUpByOther(AVChatExitCode.REJECT);
} else if (ackInfo.getEvent() == AVChatEventType.CALLEE_ACK_AGREE) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方同意通话");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "callAckObserver 呼叫时,被叫方同意通话");
AVChatSoundPlayer.instance().stop();
avChatController.isCallEstablish.set(true);
}
......@@ -459,8 +459,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
// 来电超时,自己未接听
if (mIsInComingCall) {
activeMissCallNotifier();
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "timeoutObserver 来电超时,自己未接听");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "timeoutObserver 来电超时,自己未接听");
}
finish();
}
......@@ -481,39 +481,39 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
}
switch (notification.getControlCommand()) {
case AVChatControlCommand.SWITCH_AUDIO_TO_VIDEO:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 音频切换到视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 音频切换到视频");
incomingAudioToVideo();
break;
case AVChatControlCommand.SWITCH_AUDIO_TO_VIDEO_AGREE:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 同意从音频切换到视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 同意从音频切换到视频");
// 对方同意切成视频啦
state = AVChatType.VIDEO.getValue();
avChatVideoUI.onAudioToVideoAgree(notification.getAccount());
break;
case AVChatControlCommand.SWITCH_AUDIO_TO_VIDEO_REJECT:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 拒绝从音频切换到视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 拒绝从音频切换到视频");
rejectAudioToVideo();
ToastUtil.toastShort(AVChatActivity.this, R.string.im_avchat_switch_video_reject);
break;
case AVChatControlCommand.SWITCH_VIDEO_TO_AUDIO:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 视频切换到音频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 视频切换到音频");
onVideoToAudio();
break;
case AVChatControlCommand.NOTIFY_VIDEO_OFF:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 通知对方自己关闭了视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 通知对方自己关闭了视频");
// 收到对方关闭画面通知
if (state == AVChatType.VIDEO.getValue()) {
avChatVideoUI.peerVideoOff();
}
break;
case AVChatControlCommand.NOTIFY_VIDEO_ON:
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleCallControl 通知对方自己打开了视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 通知对方自己打开了视频");
// 收到对方打开画面通知
if (state == AVChatType.VIDEO.getValue()) {
avChatVideoUI.peerVideoOn();
......@@ -533,24 +533,24 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
protected void handleWithConnectServerResult(int auth_result) {
LogUtil.i(TAG, "result code->" + auth_result);
if (auth_result == 200) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult onConnectServer success");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult onConnectServer success");
LogUtil.d(TAG, "onConnectServer success");
} else if (auth_result == 101) { // 连接超时
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 连接超时 101");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 连接超时 101");
avChatController.showQuitToast(AVChatExitCode.PEER_NO_RESPONSE);
} else if (auth_result == 401) { // 验证失败
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 验证失败 401");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 验证失败 401");
avChatController.showQuitToast(AVChatExitCode.CONFIG_ERROR);
} else if (auth_result == 417) { // 无效的channelId
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 无效的channelId 417");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 无效的channelId 417");
avChatController.showQuitToast(AVChatExitCode.INVALIDE_CHANNELID);
} else { // 连接服务器错误,直接退出
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 连接服务器错误" + auth_result);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleWithConnectServerResult 连接服务器错误" + auth_result);
avChatController.showQuitToast(AVChatExitCode.CONFIG_ERROR);
}
}
......@@ -592,8 +592,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
if (client != null) {
String option = ackInfo.getEvent() == AVChatEventType.CALLEE_ONLINE_CLIENT_ACK_AGREE ? "接听!" : "拒绝!";
ToastUtil.toastShort(AVChatActivity.this, "通话已在" + client + "端被" + option);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "onlineAckObserver 通话已在" + client + "端被" + option);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "onlineAckObserver 通话已在" + client + "端被" + option);
}
finish();
}
......@@ -656,8 +656,8 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
@Override
public void onReceiveAudioToVideoAgree() {
// 同意切换为视频
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "onReceiveAudioToVideoAgree 同意切换为视频");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "onReceiveAudioToVideoAgree 同意切换为视频");
state = AVChatType.VIDEO.getValue();
audioRoot.setVisibility(View.GONE);
videoRoot.setVisibility(View.VISIBLE);
......@@ -714,16 +714,16 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
// 主动挂断
private void manualHangUp(int exitCode) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "manualHangUp 主动挂断");
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "manualHangUp 主动挂断");
releaseVideo();
avChatController.hangUp(exitCode);
}
// 被对方挂断
private void hangUpByOther(int exitCode) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.YUNXIN, "hangUpByOther 被对方挂断 exitCode:"+exitCode);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "hangUpByOther 被对方挂断 exitCode:"+exitCode);
if (exitCode == AVChatExitCode.PEER_BUSY) {
avChatController.hangUp(AVChatExitCode.HANGUP);
finish();
......
......@@ -11,8 +11,8 @@ import android.os.Build;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.common.log.LogUtil;
public class NetworkUtil {
......@@ -148,7 +148,7 @@ public class NetworkUtil {
}
}
curNetworkType = type;
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:" + type);
return type;
}
......@@ -274,10 +274,10 @@ public class NetworkUtil {
NetworkInfo ni = cm.getActiveNetworkInfo();
if (ni != null) {
if (ni.getType() == ConnectivityManager.TYPE_WIFI) {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:TYPE_WIFI");
return true;
} else {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.NETSTATUS, "网络类型:非WIFI环境");
return false;
}
......
......@@ -15,8 +15,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatNotifyOption;
import com.netease.nimlib.sdk.avchat.model.AVChatParameters;
import com.netease.nimlib.sdk.avchat.video.AVChatCameraCapturer;
import com.netease.nimlib.sdk.avchat.video.AVChatVideoCapturerFactory;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlnet.utils.log.AliYunLogConfig;
import com.ydl.ydlnet.utils.log.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.common.log.LogUtil;
import com.yidianling.avchatkit.common.widgets.MultiSelectDialog;
......@@ -76,7 +76,7 @@ public class AVChatController {
* 恢复视频和语音发送
*/
public void resumeVideo() {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "恢复视频和语音发送");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "恢复视频和语音发送");
if (needRestoreLocalVideo) {
AVChatManager.getInstance().muteLocalVideo(false);
needRestoreLocalVideo = false;
......@@ -93,7 +93,7 @@ public class AVChatController {
* 关闭视频和语音发送.
*/
public void pauseVideo() {
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "关闭视频和语音发送");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "关闭视频和语音发送");
if (!AVChatManager.getInstance().isLocalVideoMuted()) {
AVChatManager.getInstance().muteLocalVideo(true);
needRestoreLocalVideo = true;
......@@ -144,10 +144,10 @@ public class AVChatController {
if (code == ResponseCode.RES_FORBIDDEN) {
ToastUtil.toastShort(context, R.string.im_avchat_no_permission);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onFailed 暂无权限,请开通音视频服务 code:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onFailed 暂无权限,请开通音视频服务 code:" + code);
} else {
ToastUtil.toastShort(context, R.string.im_avchat_call_failed);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onFailed 发起通话失败 code:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onFailed 发起通话失败 code:" + code);
}
closeRtc(avChatType == AVChatType.VIDEO ? CallStateEnum.VIDEO : CallStateEnum.AUDIO);
callback.onFailed(code, "");
......@@ -156,7 +156,7 @@ public class AVChatController {
@Override
public void onException(Throwable exception) {
LogUtil.d(TAG, "avChat call onException->" + exception);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onException avChat call onException->" + exception);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onException avChat call onException->" + exception);
closeRtc(avChatType == AVChatType.VIDEO ? CallStateEnum.VIDEO : CallStateEnum.AUDIO);
callback.onFailed(-1, exception.toString());
......@@ -195,11 +195,11 @@ public class AVChatController {
public void onFailed(int code) {
if (code == -1) {
ToastUtil.toastShort(context, "本地音视频启动失败");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onFailed 本地音视频启动失败 code:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onFailed 本地音视频启动失败 code:" + code);
} else {
ToastUtil.toastShort(context, "建立连接失败");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onFailed 建立连接失败 code:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onFailed 建立连接失败 code:" + code);
}
LogUtil.e(TAG, "accept onFailed->" + code);
......@@ -211,7 +211,7 @@ public class AVChatController {
@Override
public void onException(Throwable exception) {
LogUtil.d(TAG, "accept exception->" + exception);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "onException accept exception->" + exception);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "onException accept exception->" + exception);
handleAcceptFailed(avChatType == AVChatType.VIDEO ?
CallStateEnum.VIDEO_CONNECTING : CallStateEnum.AUDIO);
......@@ -225,12 +225,12 @@ public class AVChatController {
if (!AVChatManager.getInstance().isLocalAudioMuted()) { // isMute是否处于静音状态
// 关闭音频
AVChatManager.getInstance().muteLocalAudio(true);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "toggleMute 关闭音频");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "toggleMute 关闭音频");
} else {
// 打开音频
AVChatManager.getInstance().muteLocalAudio(false);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "toggleMute 打开音频");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "toggleMute 打开音频");
}
}
......@@ -245,7 +245,7 @@ public class AVChatController {
@Override
public void onSuccess(Void aVoid) {
LogUtil.d(TAG, "videoSwitchAudio onSuccess");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onSuccess");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onSuccess");
//关闭视频
AVChatManager.getInstance().stopVideoPreview();
......@@ -258,14 +258,14 @@ public class AVChatController {
@Override
public void onFailed(int code) {
LogUtil.d(TAG, "videoSwitchAudio onFailed");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onFailed code:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onFailed code:" + code);
}
@Override
public void onException(Throwable exception) {
LogUtil.d(TAG, "videoSwitchAudio onException");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onException exception:" + exception);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送视频切换为音频命令 onException exception:" + exception);
}
});
......@@ -277,7 +277,7 @@ public class AVChatController {
@Override
public void onSuccess(Void aVoid) {
LogUtil.d(TAG, "requestSwitchToVideo onSuccess");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onSuccess");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onSuccess");
avSwitchListener.onAudioToVideo();
}
......@@ -285,14 +285,14 @@ public class AVChatController {
@Override
public void onFailed(int code) {
LogUtil.d(TAG, "requestSwitchToVideo onFailed" + code);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onFailed:" + code);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onFailed:" + code);
}
@Override
public void onException(Throwable exception) {
LogUtil.d(TAG, "requestSwitchToVideo onException" + exception);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onException:" + exception);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送音频切换为视频命令 onException:" + exception);
}
});
......@@ -304,7 +304,7 @@ public class AVChatController {
@Override
public void onSuccess(Void aVoid) {
LogUtil.d(TAG, "receiveAudioToVideo onSuccess");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送同意从音频切换为视频的命令 onSuccess");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送同意从音频切换为视频的命令 onSuccess");
avSwitchListener.onReceiveAudioToVideoAgree();
}
......@@ -312,7 +312,7 @@ public class AVChatController {
@Override
public void onFailed(int code) {
LogUtil.d(TAG, "receiveAudioToVideo onFailed");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,
"switchVideoToAudio 发送同意从音频切换为视频的命令 onFailed:" + code);
}
......@@ -320,7 +320,7 @@ public class AVChatController {
@Override
public void onException(Throwable exception) {
LogUtil.d(TAG, "receiveAudioToVideo onException");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送同意从音频切换为视频的命令 exception:" + exception);
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "switchVideoToAudio 发送同意从音频切换为视频的命令 exception:" + exception);
}
});
......@@ -468,39 +468,39 @@ public class AVChatController {
// 服务器返回数据错误
case AVChatExitCode.CONFIG_ERROR:
ToastUtil.toastShort(context, R.string.im_avchat_net_error_then_quit);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,
"网络异常,通话结束 网络切换4 网络异常8 服务器返回数据错误10 code:" + code);
break;
case AVChatExitCode.REJECT:
ToastUtil.toastShort(context, R.string.im_avchat_call_reject);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "被对方拒绝");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "被对方拒绝");
break;
case AVChatExitCode.PEER_HANGUP:
case AVChatExitCode.HANGUP:
if (isCallEstablish.get()) {
ToastUtil.toastShort(context, R.string.im_avchat_call_finish);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "通话结束");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "通话结束");
}
break;
case AVChatExitCode.PEER_BUSY:
ToastUtil.toastShort(context, R.string.im_avchat_peer_busy);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "对方正在通话中,请稍后再拨。");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "对方正在通话中,请稍后再拨。");
break;
case AVChatExitCode.PROTOCOL_INCOMPATIBLE_PEER_LOWER:
ToastUtil.toastShort(context, R.string.im_avchat_peer_protocol_low_version);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "对方版本过低,请提示对方升");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "对方版本过低,请提示对方升");
break;
case AVChatExitCode.PROTOCOL_INCOMPATIBLE_SELF_LOWER:
ToastUtil.toastShort(context, R.string.im_avchat_local_protocol_low_version);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "版本过低,请升级后使用");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "版本过低,请升级后使用");
break;
case AVChatExitCode.INVALIDE_CHANNELID:
ToastUtil.toastShort(context, R.string.im_avchat_invalid_channel_id);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "对方已挂断");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "对方已挂断");
break;
case AVChatExitCode.LOCAL_CALL_BUSY:
ToastUtil.toastShort(context, R.string.im_avchat_local_call_busy);
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN, "本地通话中,无法进行通话。");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "本地通话中,无法进行通话。");
break;
default:
break;
......
......@@ -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.AVChatVideoCapturerFactory;
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.AliYunLogHelper;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.avchatkit.TeamAVChatProfile;
import com.yidianling.avchatkit.common.activity.AVChatBaseUI;
......@@ -438,7 +438,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
public void onSuccess(AVChatData data) {
chatId = data.getChatId();
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
......@@ -461,16 +461,16 @@ public class TeamAVChatActivity extends AVChatBaseUI {
startLocalPreview();
startTimerForCheckReceivedCall();
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) {
if (code == ResponseCode.RES_ENONEXIST) {
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 {
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 {
updateAudioMuteButtonState();
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) {
......@@ -504,7 +504,7 @@ public class TeamAVChatActivity extends AVChatBaseUI {
updateAudioMuteButtonState();
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() {
......
......@@ -17,10 +17,10 @@ import com.ydl.ydlcommon.ui.LoadingDialogFragment
import com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance
import com.ydl.ydlcommon.utils.NetworkParamsUtils
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.view.dialog.CommonDialog
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.ToastUtil
import com.yidianling.im.R
......@@ -196,7 +196,7 @@ object IMChatUtil {
isFromQingShu: Int,
context: AppCompatActivity
) {
getInstance().sendLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession(
......
......@@ -5,8 +5,8 @@ import android.content.Context;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
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.AliYunLogHelper;
import com.yidianling.nimbase.api.BaseNimUIKit;
import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.uikit.business.contact.selector.activity.ContactSelectActivity;
......@@ -32,7 +32,7 @@ public class NimUIKit extends BaseNimUIKit {
*/
public static void startYDLChatting(Context context, String id, SessionTypeEnum sessionType, SessionCustomization
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);
}
......
......@@ -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.model.CustomNotification;
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.AliYunLogHelper;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack;
......@@ -151,7 +151,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers(false);
super.onDestroy();
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"退出聊天页面");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN,"退出聊天页面");
}
@Override
......
......@@ -49,11 +49,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.YdlBuryPointUtil;
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.view.CircleImageView;
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.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.helper.IMChatUtil;
......@@ -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 {
// 替换成tip
message = MessageBuilder.createTipMessage(message.getSessionId(), message.getSessionType());
message.setContent("该消息无法发送");
message.setStatus(MsgStatusEnum.success);
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);
......@@ -1219,11 +1219,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:已被对方拉黑");
ToastUtil.toastLong(getActivity(), "您已被对方拉黑!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:已被对方拉黑");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:已被对方拉黑 sessionId:" + sessionId);
} else if (code == 404) {
LogHelper.Companion.getInstance().writeLogSync("发送消息失败:对象不见了");
ToastUtil.toastLong(getActivity(), "对象不见了!");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.YUNXIN,"sendFailWithBlackList 发送消息失败:对象不见了 404");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.YUNXIN, "sendFailWithBlackList 发送消息失败:对象不见了 404 sessionId:" + sessionId);
} else {
//上传至后台
......
......@@ -6,8 +6,8 @@ import com.tencent.bugly.crashreport.CrashReport
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.ActivityManager
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.AliYunLogHelper
import com.yidianling.common.tools.LogUtil
import com.yidianling.im.api.bean.IMLoginInfo
import com.yidianling.im.api.bean.IMRequestCallback
......@@ -61,19 +61,19 @@ object LoginUtils {
override fun onSuccess(t: IMLoginInfo?) {
LogUtil.e("IM登录成功:" + "info.account:" + info.account + "info.passWord" + info.passWord)
UserIn.imSetAccount(userInfo?.uid ?: "")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "IM登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "IM登录成功")
}
override fun onFailed(i: Int) {
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?) {
LogUtil.e("IM登录onException:${throwable?.message}")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "IM登录onException:${throwable?.message}")
}
}
......@@ -98,7 +98,7 @@ object LoginUtils {
@JvmStatic
fun logoutClearLocal() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "退出登录")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "退出登录")
UserIn.imLogout()
UserIn.closePlayer()
UserIn.clearImData()
......
......@@ -14,9 +14,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
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.IMRequestCallback
import com.yidianling.user.LoginUtils
......@@ -171,14 +171,14 @@ class SmsLoginActivity : BaseActivity() {
// finish()
LoginUtils.loginSuccessOperate(this)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 成功")
}, object : ThrowableConsumer() {
override fun accept(msg: String) {
dismissProgressDialog()
YdlCommonOut.showToast(msg)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "短信验证码 失败 msg:$msg ")
}
})
}
......
......@@ -26,9 +26,9 @@ import com.ydl.ydlcommon.utils.JPushUtils
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
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.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
......@@ -430,7 +430,7 @@ object OneKeyLoginHelp {
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
if (it.code == 200) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录成功")
ToastUtil.toastShort("登录成功")
saveUserData(it.data)
if (it.data.firstLogin == 1) {//第一次登录:是注册
......@@ -464,12 +464,12 @@ object OneKeyLoginHelp {
LoginUtils.loginSuccessOperate(mActivity)
}
} else {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录失败 msg:${it.msg}")
ToastUtil.toastShort(it.msg)
mPhoneNumberAuthHelper?.hideLoginLoading()
}
}, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN,"一键登录Error msg:${it.message}")
ToastUtil.toastShort(it.message)
mPhoneNumberAuthHelper?.hideLoginLoading()
})
......
......@@ -34,8 +34,6 @@ import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
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.RxAppTool
import com.yidianling.common.tools.RxKeyboardTool
......
......@@ -7,9 +7,9 @@ import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.StringUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils
......@@ -111,8 +111,8 @@ class InputPassWordPresenterImpl :
.doAfterTerminate { mView.showLoading(false) }
.subscribe({
if (it?.data == null) {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录失败 msg: ${it.msg}")
ToastUtil.toastShort(it.msg)
mView.startAnim()
} else {
......@@ -132,13 +132,13 @@ class InputPassWordPresenterImpl :
}
mView.closeActivity()
}
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 登录成功")
}
}, {
YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "手机号密码 Error msg: ${it.message}")
})
}
......
......@@ -9,9 +9,9 @@ import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlnet.utils.log.AliYunLogConfig
import com.ydl.ydlnet.utils.log.AliYunLogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.LoginUtils
import com.yidianling.user.StatusUtils
......@@ -91,21 +91,21 @@ class LoginPresenterImpl(view: ILoginContract.View) :
)
}
mView.autoLoginSuccess()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登录成功")
} else {
// ToastUtil.toastShort(it.msg)
mView.aliAuthFailed()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 失败 msg: ${it.msg}")
}
}, {
//走验证码、密码登录
mView.aliAuthFailed()
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, "通过一键认证服务登陆 Error msg: ${it.message}")
})
}
......@@ -263,14 +263,14 @@ class LoginPresenterImpl(view: ILoginContract.View) :
if (media == SHARE_MEDIA.QQ) "qq" else "weixin"
)
LogHelper.getInstance().writeLogSync(media.getName() + "登录成功")
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录成功")
}, {
mView.dismissProgressView()
YdlCommonOut.showToast(it.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.LOGIN, media.getName() + "登录失败")
})
}
......
......@@ -14,8 +14,8 @@ import android.widget.LinearLayout
import com.alipay.sdk.app.PayTask
import com.tencent.mm.opensdk.modelpay.PayReq
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.AliYunLogHelper
import com.yidianling.common.tools.RxImageTool
import com.yidianling.ydl_pay.R
import com.yidianling.ydl_pay.common.bean.*
......@@ -211,7 +211,7 @@ class CommonPayDialog : Dialog {
private fun getOrderInfo() {
if (!NetUtils.isConnected(activity)) {
ToastHelper.show(activity, activity.getString(R.string.net_error))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,无网络")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,无网络")
// progress.visibility = View.GONE
dismissProgressDialog()
return
......@@ -230,18 +230,18 @@ class CommonPayDialog : Dialog {
progress_layout.visibility = View.GONE
view_pager.visibility = View.VISIBLE
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "获取下单信息,成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "获取下单信息,成功")
updateDataOnView(it.data)
} else {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息data=null msg: ${it.msg}")
ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE
}
} else {
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息code!=200 msg: ${it.msg}")
ToastHelper.show(activity, it.msg)
// progress.visibility = View.GONE
}
......@@ -249,8 +249,8 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
// progress.visibility = View.GONE
ToastHelper.show(activity, e.message!!)
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "获取下单信息error e:${e.message}")
})
}
......@@ -436,7 +436,7 @@ class CommonPayDialog : Dialog {
}
bean.orderType = payBusinessType.toString()
bean.payType = useMoneyType.toString()
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"创建订单,支付方式payWay:$payWay---payMoney:$payMoney----useMoneyType:$useMoneyType"
)
......@@ -449,7 +449,7 @@ class CommonPayDialog : Dialog {
if (it.code == 200) {
if (it.data != null) {
if (it.data.payStatus) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"创建订单,支付成功"
)
......@@ -494,7 +494,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult")
private fun getAliPayOrderId(payId: String, isThreePay: Int) {
if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:无网络"
)
......@@ -509,13 +509,13 @@ class CommonPayDialog : Dialog {
.subscribeOn(Schedulers.io())
.subscribe({
if (it.data != null) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:无网络"
)
aliPay(it.data.aliSign)
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:data = null msg: ${it.msg} "
)
......@@ -525,7 +525,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:error message: ${it.message} localizedMessage: ${it.localizedMessage}"
)
......@@ -541,7 +541,7 @@ class CommonPayDialog : Dialog {
val result = alipay.payV2(aliSign, true)
val payResult = PayResult(result)
if ("9000" == payResult.resultStatus) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:支付成功"
)
......@@ -552,7 +552,7 @@ class CommonPayDialog : Dialog {
}
dismissProgressDialog()
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"支付宝支付:resultStatus != 9000 memo${payResult.memo} "
)
......@@ -569,7 +569,7 @@ class CommonPayDialog : Dialog {
@SuppressLint("CheckResult")
private fun getWeiXinPayOrderId(payId: String, isThreePay: Int, merchantType: String) {
if (!NetUtils.isConnected(activity)) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付,无网络"
)
......@@ -586,7 +586,7 @@ class CommonPayDialog : Dialog {
if (it.data != null) {
weixinPay(it.data.option)
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付data=null ${it.msg}"
)
......@@ -596,7 +596,7 @@ class CommonPayDialog : Dialog {
dismissProgressDialog()
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付,异常:message:${it.message}----localizedMessage:${it.localizedMessage}"
)
......@@ -633,7 +633,7 @@ class CommonPayDialog : Dialog {
.subscribe({
dismissProgressDialog()
if (it.data != null && it.code == 0) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:成功"
)
......@@ -642,7 +642,7 @@ class CommonPayDialog : Dialog {
dismiss()
}
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:失败 msg:${it.msg}"
)
......@@ -651,7 +651,7 @@ class CommonPayDialog : Dialog {
}
}
}, {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"余额支付:ERROR message:${it.message} localizedMessage: ${it.localizedMessage}"
)
......@@ -666,7 +666,7 @@ class CommonPayDialog : Dialog {
fun onEvent(event: WeiXinPayStatusEvent) {
dismissProgressDialog()
if (event.success) {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付成功"
)
......@@ -674,7 +674,7 @@ class CommonPayDialog : Dialog {
listener!!.onSuccesed()
dismiss()
} else {
AliYunLogHelper.getInstance().sendLog(
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.PAY,
"微信支付:失败 msg:${event.msg}"
)
......
......@@ -18,9 +18,9 @@ import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
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.ToastUtil
import com.yidianling.im.api.service.IImService
......@@ -553,7 +553,7 @@ class PayActivity : BaseActivity() {
* 点击支付
*/
private fun onClickPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "点击支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "点击支付")
when (inlet) {
INLET_NORMAL -> {
//正常入口
......@@ -619,7 +619,7 @@ class PayActivity : BaseActivity() {
if (null == payParams) {
return
}
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "进入充值, 0微信充值,其他支付宝充值:$select")
HttpUtils.recharge(RechargeParam(payParams!!.needPay.toInt().toString()))
.subscribeOn(Schedulers.io())
......@@ -639,7 +639,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功")
ToastUtil.toastShort("支付成功")
......@@ -652,7 +652,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败$msg")
}
})
......@@ -665,18 +665,18 @@ class PayActivity : BaseActivity() {
when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 正常入口")
balancePayById(payParams!!.payId)
}
INLET_TEST -> {
//测评入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付 测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付 测评入口")
balancePayById(testAddOrderBean!!.payId!!)
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付")
balancePayById(payParams!!.payId)
}
......@@ -700,7 +700,7 @@ class PayActivity : BaseActivity() {
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付成功")
ToastUtil.toastShort("支付成功")
setResult(Activity.RESULT_OK)
finish()
......@@ -708,7 +708,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "余额支付:支付失败:$msg")
}
})
......@@ -719,7 +719,7 @@ class PayActivity : BaseActivity() {
*/
@SuppressLint("CheckResult")
private fun appPay() {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付 0 其他支付宝支付 select:${select}")
Observable.just(select)
.subscribeOn(Schedulers.io())
......@@ -737,7 +737,7 @@ class PayActivity : BaseActivity() {
.doOnSubscribe { showProgressDialog("") }
.doAfterTerminate { dismissProgressDialog() }
.subscribe(Consumer {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付成功")
LogHelper.getInstance().writeLogSync("支付成功")
setResult(Activity.RESULT_OK)
finish()
......@@ -745,7 +745,7 @@ class PayActivity : BaseActivity() {
override fun accept(msg: String) {
ToastUtil.toastShort(msg)
LogHelper.getInstance().writeLogSync("支付失败:$msg")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付失败:$msg")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付失败:$msg")
}
})
......@@ -758,20 +758,20 @@ class PayActivity : BaseActivity() {
return when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:正常入口")
wxPayById(payParams!!.payId, payParams?.merchantType.toString())
}
INLET_TEST -> {
//测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付:测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付:测评入口")
wxPayById(testAddOrderBean!!.payId!!, payParams?.merchantType.toString())
} else {
null
}
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "微信支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "微信支付")
wxPayById(payParams!!.payId, payParams?.merchantType.toString())
}
}
......@@ -797,14 +797,14 @@ class PayActivity : BaseActivity() {
return when (inlet) {
INLET_NORMAL -> {
//正常入口
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:正常入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:正常入口")
aliPayById(payParams!!.payId)
}
INLET_TEST -> {
//测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付:测评入口")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付:测评入口")
aliPayById(testAddOrderBean!!.payId!!)
} else {
......@@ -812,7 +812,7 @@ class PayActivity : BaseActivity() {
}
}
else -> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付")
aliPayById(payParams!!.payId)
}
......
......@@ -7,8 +7,8 @@ import com.tencent.mm.opensdk.constants.Build
import com.tencent.mm.opensdk.modelpay.PayReq
import com.tencent.mm.opensdk.openapi.WXAPIFactory
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.AliYunLogHelper
import com.yidianling.ydl_pay.common.bean.CommonWXPayBean
import com.yidianling.ydl_pay.common.bean.PayResult
import com.yidianling.ydl_pay.pay.bean.PayStatus
......@@ -64,13 +64,13 @@ object RxPay {
"9000" == payResult.resultStatus -> {
it.onNext(PayStatus(true))
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY, "支付宝支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY, "支付宝支付成功")
}
else -> {
it.onError(CustomThrowable(payResult.memo))
AliYunLogHelper.getInstance()
.sendLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.PAY, "支付宝支付失败 memo:${payResult.memo}")
}
}
......
......@@ -9,10 +9,10 @@ import android.support.v7.app.AlertDialog
import android.view.*
import com.ydl.ydlcommon.data.http.RxUtils
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.remind.ToastHelper
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.common.bean.params.AliPayParam
import com.yidianling.ydl_pay.common.bean.params.WxPayParam
......@@ -162,7 +162,7 @@ class PayDialog : Dialog {
if (data?.payId == null) {
ToastHelper.show("支付id有误,请返回重试")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付id有误,请返回重试")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付id有误,请返回重试")
return
}
......@@ -190,12 +190,12 @@ class PayDialog : Dialog {
this.callBack?.onSuccess()
}
LogHelper.getInstance().writeLogSync("支付成功")
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付成功")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付成功")
this.callBack?.onSuccess()
dismiss()
}, {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付失败:${it.message}")
ToastHelper.show(it.message ?: "支付失败")
LogHelper.getInstance().writeLogSync("支付失败:${it.message}")
})
......@@ -206,7 +206,7 @@ class PayDialog : Dialog {
* @param payId 支付id
*/
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)
return HttpUtils.wxPay(bean)
.compose(RxUtils.resultData())
......@@ -219,7 +219,7 @@ class PayDialog : Dialog {
* @param payId 支付Id
*/
private fun aliPayById(payId: String): Observable<PayStatus> {
AliYunLogHelper.getInstance().sendLog(AliYunLogConfig.PAY,"支付宝支付")
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.PAY,"支付宝支付")
var bean = AliPayParam(payId, 1)
return HttpUtils.getAliPayOrderId(bean)
......
......@@ -48,11 +48,11 @@ import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetWorkSpeedUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.utils.URLUtils;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLCommonDialog;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
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.RxImageTool;
import com.yidianling.common.tools.ToastUtil;
......@@ -376,7 +376,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
rightText = getIntent().getStringExtra("rightText");
if (h5Params == null) {
ToastUtil.toastShort("参数错误");
AliYunLogHelper.Companion.getInstance().sendLog(AliYunLogConfig.WEB, "参数错误 Params == null");
AliYunRichLogsHelper.Companion.getInstance().sendRichLog(AliYunLogConfig.WEB, "参数错误 Params == null");
finish();
return;
}
......@@ -691,8 +691,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
safeTipView.setLocation("orderList");
}
if (title.contains("404") || title.contains("500") || title.contains("Error")) {
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "页面错误 : url:" + view.getUrl() + "title:" + title);
}
}
......@@ -784,8 +784,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
loadFailed = true;
tb_title.setTitle("加载中");
if (wv_content != null) {
......@@ -895,8 +895,8 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
AliYunLogHelper.Companion.getInstance()
.sendLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.WEB, "onReceivedError---- errorCode: " + errorCode + "----failingUrl:" + failingUrl);
tb_title.setTitle("加载中");
loadFailed = true;
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