Configure Eclipse for Log4j

喜欢而已 提交于 2019-12-01 11:12:49

jena use log4j as logging system, and the warning messages tell explicitly that you are lacking of a log4j.properties to initialize it.

"This occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explicit configuration."

Create log4j.properties file under src and retry. You can find some sample config files here

The easiest way to do this is by going to the folder where you extracted apache jena.

  1. Find a properties file named : jena-log4j.properties. Copy this

  2. Navigate to your workspace folder where you have your source project.

  3. Go to bin folder and paste the file there. Make sure you rename the file to just log4j.properties

  4. Clean the project and run it.

The errors would now have gone.

nitz

use org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!