如何将 log4j 配置传递到 Eclipse IDE 本身?

发布于 2024-12-17 08:52:48 字数 464 浏览 3 评论 0原文

我不是在尝试为 Eclipse 项目配置 log4j,而是为 IDE 本身配置!!

当使用基于 Xtext 的插件时,我在控制台中看到此警告:

log4j:WARN No appenders could be found for logger (org.eclipse.xtext.ui.internal.Activator).
log4j:WARN Please initialize the log4j system properly.

How do I Supply a log4j configuration到 IDE 本身?

我尝试将 -Dlog4j.configuration=.../log4j.properties 添加到 eclipse.ini 中。该条目在“关于/配置”中可见,并且文件路径正确,但未拾取。

I'm not trying to configure log4j for an Eclipse project but for the IDE itself!!

When using Xtext-based plugins, I'm seeing this warning in the console:

log4j:WARN No appenders could be found for logger (org.eclipse.xtext.ui.internal.Activator).
log4j:WARN Please initialize the log4j system properly.

How do I supply a log4j configuration to the IDE itself?

I tried adding -Dlog4j.configuration=.../log4j.properties to eclipse.ini. The entry is visible in About/Configuration and the file path is correct but it's not picked up.

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

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

发布评论

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

评论(2

两人的回忆 2024-12-24 08:52:48

log4j.properties 必须位于 org.apache.log4j 插件的类路径上。因此,您必须提供包含您的配置的捆绑包片段。

由于这个原因,Xtext 随 org.eclipse.xtext.logging 一起提供。

[编辑] 因此,针对上述警告的一种解决方案是确保安装了插件 org.eclipse.xtext.logging。您可以在 Indigo 官方下载网站 上找到它。

The log4j.properties has to be on the classpath of the org.apache.log4j plugin. Therefore you'll have to provide a bundle fragment that contains your configuration.

Xtext ships with org.eclipse.xtext.logging for that reason.

[EDIT] So one solution for the warning above is to make sure that the plugin org.eclipse.xtext.logging is installed. You can find it on the official Indigo download site.

谎言 2024-12-24 08:52:48

我的解决方案是从 Eclipse 存储库安装 xText SDK

The solution for me was install xText SDK, from Eclipse repositorie

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