如何将 log4j 配置传递到 Eclipse IDE 本身?
我不是在尝试为 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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 theorg.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.我的解决方案是从 Eclipse 存储库安装 xText SDK
The solution for me was install xText SDK, from Eclipse repositorie