为什么我会从 log4j 收到此警告?

发布于 2025-01-08 02:04:15 字数 316 浏览 1 评论 0原文

我刚刚将下载的 jar 文件添加到我的外部库中。我需要对 apache.log4j 库进行任何配置吗?我应该怎么做才能停止初始化 log4j 系统?

log4j:WARN No appenders could be found for logger (FaceRecognition).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

I just added the jar file downloaded to my external library. Do I need to do any configuration for apache.log4j library? What should I do to stop initialize the log4j system?

log4j:WARN No appenders could be found for logger (FaceRecognition).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

网白 2025-01-15 02:04:15

在 Java 中添加日志记录非常简单 请参阅此处。您需要在 log4j 类中设置正确的 log4j 属性文件及其初始化。请参阅我提到的链接。

Very Simple to add logging in Java See here. You need to set proper log4j properties file and its initialization in log4j class. See my mentioned link.

記柔刀 2025-01-15 02:04:15

log4j jar 不在构建路径中或 log4j 属性文件不在构建路径中。尝试将 log4j jar 包含在它将起作用的构建路径中。我已将 log4j.jar 粘贴到 web-inf/lib 文件夹中。

The log4j jar is not in the build path or log4j properties file is not in the build path. try to include the log4j jar in the build path it will work. i have pasted the log4j.jar in the web-inf/lib folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文