@ProxyService(proxy = LogProxy.class) public class LogProxyImpl extends LogProxy { @Override public void log(int logLevel, String tag, String msg, Throwable t) { switch (logLevel) { case Log.DEBUG: if (t == null) { android.util.Log.d(tag, msg); } else { android.util.Log.d(tag, msg, t); } break; case Log.INFO: if (t == null) { android.util.Log.i(tag, msg); } else { android.util.Log.i(tag, msg, t); } break; case Log.WARN: if (t == null) { android.util.Log.w(tag, msg); } else { android.util.Log.w(tag, msg, t); } break; case Log.ERROR: if (t == null) { android.util.Log.e(tag, msg); } else { android.util.Log.e(tag, msg, t); } break; default: if (t == null) { android.util.Log.v(tag, msg); } else { android.util.Log.v(tag, msg, t); } break; } } @Override public boolean isColorLevel() { return true; }}
/*** Agent for reporting mini program events.* @param eId eventId* @param eventName event name* @param props event property* @param app Mini program information.* @return is true, the SDK internal reporting logic is no longer executed, and the user-defined event reporting logic is used.*/ public abstract boolean reportMiniAppEvent(int eId, String eventName, JSONObject props, MiniApp app);
/** Custom event */public static final int EID_None = 0;/** Open a mini program */.public static final int EID_OPEN_MINIAPP = 1;/** Update mini program */ public static final int EID_OPEN_MINIAPP = 1.public static final int EID_UPDATE_MINIAPP = 2;/** Download mini program */public static final int EID_DOWNLOAD_MINIAPP = 3;/** Mini-program page view */public static final int EID_MINIAPP_PAGE_VIEW = 4;/** Exit mini program */ public static final int EID_MINIAPP_PAGE_VIEW = 4.public static final int EID_EXIT_MINIAPP = 5;/** Behavioural event of mini program */public static final int EID_MINIAPP_ACTION = 6;
/*** Mini program real-time log upload agent* @param page Current page* @param jsLibVersion base library version* @param app mini program information* @param filterMsgs filter keywords* @param logs logs* @return is true, the SDK internal reporting logic is no longer executed.*/ public abstract boolean reportRealTimeLog(String page, String jsLibVersion, MiniApp app, String[] filterMsgs, ArrayList<RealTimeLogItem> logs);
/*** feedback log upload** @param appId mini program appId* @param logPath The log path.* @return is true, the SDK internal upload logic is not executed.*/ public abstract boolean uploadUserLog(String appId, String logPath);
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback