我的 pom.xml 中包含 browsermob-proxy:
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-proxy</artifactId>
<version>2.0.0</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
我在 browsermob-proxy 站点上看到了一个关于如何更改日志记录的部分(https://github.com/lightbody/browsermob-proxy):
在独立模式下运行时,代理会从 conf/bmp-logging.properties 文件加载默认日志记录配置。要提高/降低日志记录级别,请更改 net.lightbody.bmp 的日志记录条目。
然后我在 github ( https://github.com/lightbody/browsermob-proxy/blob/master/browsermob-dist/src/main/config/bmp-logging.properties ) 中看到一个我可以更改为的属性文件获取我需要的日志,但我不确定如何更改此文件,或者在哪里可以找到它,因为我将它用作 Maven 依赖项。