详细介绍在:http://hc.apache.org/httpclient-3.x/logging.html

一般使用context logging基本够用,context logging解释原文如下:

context logging

Context logging contains information about the internal operation of HttpClient as it performs HTTP requests. Each class has its own log named according to the class's fully qualified name. For example the class HttpClient has a log named org.apache.commons.httpclient.HttpClient. Since all classes follow this convention it is possible to configure context logging for all classes using the single log named org.apache.commons.httpclient.

Example

Commons Logging comes with a basic logger called SimpleLog. This logger writes all logged messages to System.err. The following examples show how to configure Commons Logging via system properties to use SimpleLog.

配置代码如下:

相关文章:

  • 2022-02-05
  • 2021-12-30
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2021-06-21
  • 2021-11-22
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2021-08-17
相关资源
相似解决方案