Skip to content

Commit

Permalink
silenced Jena
Browse files Browse the repository at this point in the history
  • Loading branch information
rbossy committed Jul 6, 2017
1 parent e339cd7 commit 22cf6df
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Logger;

import org.apache.jena.rdf.model.Literal;
Expand All @@ -14,7 +15,7 @@
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.shared.PrefixMapping;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.PropertyConfigurator;
import org.bibliome.alvisnlp.modules.SectionModule.SectionResolvedObjects;
import org.bibliome.alvisnlp.modules.trie.TrieProjector;
import org.bibliome.util.Iterators;
Expand Down Expand Up @@ -109,7 +110,11 @@ private static String getNodeValue(RDFNode node) {
}

private Model createModel(Logger logger) throws IOException {
BasicConfigurator.configure();
Properties props = new Properties();
props.setProperty("log4j.rootLogger", "WARNING, A1");
props.setProperty("log4j.appender.A1", "org.apache.log4j.varia.NullAppender");
// BasicConfigurator.configure();
PropertyConfigurator.configure(props);
Model model = ModelFactory.createDefaultModel();
model.setNsPrefixes(PrefixMapping.Standard);
model.setNsPrefix("xsd", "http://www.w3.org/2001/XMLSchema#");
Expand Down

0 comments on commit 22cf6df

Please sign in to comment.