| | |
| | | package com.hdl.linkpm.sdk.utils; |
| | | |
| | | import android.text.TextUtils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.JsonObject; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLLinkCopyException; |
| | |
| | | |
| | | public static void submit(String requestUrl, Object json, HDLLinkCopyException e) { |
| | | try { |
| | | LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high); |
| | | JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(json)); |
| | | String utfStr = ""; |
| | | if (jsonObject != null) { |
| | | try { |
| | | byte[] data = jsonObject.getBytes("data"); |
| | | utfStr = new String(data); |
| | | } catch (Exception e1) { |
| | | |
| | | } |
| | | } |
| | | if (!TextUtils.isEmpty(utfStr)) { |
| | | LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json) + "--utf-8:" + utfStr, null, Level.high); |
| | | } else { |
| | | LogUtil.log(requestUrl, "code:" + e.getCode() + "--msg:" + e.getMsg() + "--params:" + HDLGsonUtils.toJson(json), null, Level.high); |
| | | |
| | | } |
| | | } catch (Exception e1) { |
| | | |
| | | } |