I have an application which use a external library which dumps a big amount of warning messages which slows the application at runtime.
WARNING: Property http://localhost:8080/dwa/rm/urn:rational::1-55422447386d3378-M-00000200/types/attrDef-7 could not be parsed as datatype http://www.w3.org/2001/XMLSchema#dateTime
com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '2015-06-10' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] Lexical form '2015-06-10' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#dateTime -> class com.hp.hpl.jena.datatypes.xsd.XSDDateTime] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '2015-06-10' is not a valid value for 'dateTime'.
at com.hp.hpl.jena.graph.impl.LiteralLabelImpl.getValue(LiteralLabelImpl.java:339)
at com.hp.hpl.jena.graph.Node_Literal.getLiteralValue(Node_Literal.java:39)
at com.hp.hpl.jena.rdf.model.impl.LiteralImpl.getValue(LiteralImpl.java:98)
This external library uses Java logging API. Deep problem info here:
I tried with
Logger.getLogger("org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper").setLevel(Level.OFF);
but once it is take into consideration, otherwise is not on different run. So I need to solve my problem in general way - to override logging.properties file.
If the application works only on my machine I can do:
-Djava.util.logging.config.file=C:\Temp\logging.properties
But it is a web application and it runs on different environment on which I do not have a control. So is it a way to disable messages from that problem class? Using maven to package the new configurations or some other trick?