org.apache.commons.logging logging:开启debug
时间: 2023-07-10 20:24:29 浏览: 211
要开启 Apache Commons Logging 的 debug 模式,可以在应用程序启动时设置系统属性 `org.apache.commons.logging.simplelog.defaultlog` 值为 `debug`,例如在命令行中使用以下命令:
```
java -Dorg.apache.commons.logging.simplelog.defaultlog=debug MyApp
```
这将启用所有使用 Apache Commons Logging 的库的 debug 日志输出。如果只想针对特定的库开启 debug 模式,可以将 `defaultlog` 替换为 `log.<loggername>.level`,其中 `<loggername>` 是库的名称。例如,要为 HttpClient 库开启 debug 模式,可以使用以下命令:
```
java -Dorg.apache.commons.logging.log.org.apache.http=debug MyApp
```
相关问题
提示错误[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.drools:droolsjbpm-integration:7.74.0-SNAPSHOT (D:\droolsjbpm-integration-main\droolsjbpm-integration-main\pom.xml) has 1 error [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
看起来你在使用 Maven 构建项目时遇到了一些问题。错误日志显示 Maven 找不到 `commons-httpclient:commons-httpclient:jar:3.1` 这个依赖,可能是由于连接到 Maven 仓库时出现了连接超时的问题导致的。你可以尝试再次运行 Maven 并加上 `-e` 参数来查看完整的错误堆栈信息,或者使用 `-X` 参数来启用完整的调试日志。同时,你也可以参考 Maven 的文档或者寻求社区支持来解决这个问题。
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.4.6:compile (default) on project wordcount: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
从错误信息来看,这个错误可能不是由你的代码引起的,而是由 Maven 插件引起的。可能会有多种原因导致这个错误,例如 Maven 插件版本不兼容或依赖项冲突等。以下是一些可能的解决方法:
1. 确认 Maven 插件的版本是否正确。你可以尝试更新或回滚插件版本,看看是否有所改善。
2. 确认你的项目依赖项是否正确。你可以删除本地 Maven 仓库中的依赖项,然后重新构建项目,看看是否有所改善。
3. 确认你的代码是否存在语法错误或逻辑错误。你可以使用 Scala REPL 或其他工具来验证你的代码是否正确。
如果你仍然无法解决问题,请尝试提供更多上下文信息,例如你的 Maven 配置文件和项目依赖项列表等。这样我才能更好地帮助你解决问题。
阅读全文