com.orhanobut.logger.Logger.e()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(287)

本文整理了Java中com.orhanobut.logger.Logger.e()方法的一些代码示例,展示了Logger.e()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.e()方法的具体详情如下:
包路径:com.orhanobut.logger.Logger
类名称:Logger
方法名:e

Logger.e介绍

暂无

代码示例

代码示例来源:origin: jaydenxiao2016/AndroidFire

public static void loge(Throwable throwable, String message, Object... args) {
  if (DEBUG_ENABLE) {
    Logger.e(throwable, message, args);
  }
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

public static void loge(String message, Object... args) {
  if (DEBUG_ENABLE) {
    Logger.e(message, args);
  }
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void call(Throwable throwable) {
    Logger.e(throwable.toString());
  }
});

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void onError(FileInfo fileInfo, String s) {
    _updateVideoInfo(fileInfo);
    Logger.e(s);
    sRxBus.post(fileInfo);
  }
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
  mView.loadNoData();
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
  mView.loadNoData();
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
  mView.loadNoData();
}

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onError(Throwable e) {
  Logger.e(e.toString());
  mView.loadNoData();
}

代码示例来源:origin: Rukey7/MvpApp

/**
   * 读取 assets 文件
   * @param context
   * @param fileName
   * @return
   */
  public static String readData(Context context, String fileName) {
    InputStream inStream = null;
    String data = null;
    try {
      inStream = context.getAssets().open(fileName);     //打开assets目录中的文本文件
      byte[] bytes = new byte[inStream.available()];  //inStream.available()为文件中的总byte数
      inStream.read(bytes);
      inStream.close();
      data = new String(bytes, "utf-8");        //将bytes转为utf-8字符串
    } catch (IOException e) {
      Logger.e(e.toString());
      e.printStackTrace();
    }
    return data;
  }
}

代码示例来源:origin: Rukey7/MvpApp

private void init(InputStream in) throws JSONException {
  if(in == null)
    throw new NullPointerException("input stream cannot be null!");
  mInput = in;
  Logger.e("init");
  String json = IOUtils.getString(mInput);
  Logger.w(json);
  init(json);
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public boolean urlClicked(String url) {
    Logger.e(url);
    String newsId = NewsUtils.clipNewsIdFromUrl(url);
    Logger.w(url);
    if (newsId != null) {
      launch(NewsDetailActivity.this, newsId);
    }
    return true;
  }
})

代码示例来源:origin: Rukey7/MvpApp

@Override
public void onComplete(FileInfo fileInfo) {
  _updateVideoInfo(fileInfo);
  sRxBus.post(fileInfo);
  // 通知 Video 主界面刷新下载数
  sRxBus.post(new VideoEvent());
  Logger.e("onComplete " + fileInfo.toString());
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public Response intercept(Chain chain) throws IOException {
    Request request = chain.request();
    if (!NetUtil.isNetworkAvailable(AndroidApplication.getContext())) {
      request = request.newBuilder().cacheControl(CacheControl.FORCE_CACHE).build();
      Logger.e("no network");
    }
    Response originalResponse = chain.proceed(request);
    if (NetUtil.isNetworkAvailable(AndroidApplication.getContext())) {
      //有网的时候读接口上的@Headers里的配置,你可以在这里进行统一的设置
      String cacheControl = request.cacheControl().toString();
      return originalResponse.newBuilder()
          .header("Cache-Control", cacheControl)
          .removeHeader("Pragma")
          .build();
    } else {
      return originalResponse.newBuilder()
          .header("Cache-Control", "public, " + CACHE_CONTROL_CACHE)
          .removeHeader("Pragma")
          .build();
    }
  }
};

相关文章