// eslint-disable-next-line import/no-unresolved
import { NativeModules } from 'react-native';
import modeManager from '../common/modeManager';

export default {
  /**
   * 上报日志
   * @param {string} type 
   * @param {any} data 
   */
  postLog(type, data) {
    type = type === "warn" ? "info" : type;
    NativeModules.KLog[type](modeManager.getName('MiniApp'), JSON.stringify(data));
  }
};
