Hello,
I am lost since more than one hour.
I need to debug a test, and for that put for a time my logs at FINER level.
I see a message telling to go see a LoggingWatcher class, but with no clues
inside.
I see that some classes declares it this way :
@Rule
public final LoggingWatcher listener = new LoggingWatcher(Context.LOGGER);
but then a :
Context.LOGGER.setLevel(Level.FINER);
doesn’t work.
I find also a LogRecordCollector class, shall it help me ?
I have a test class that starts this way :
public final strictfp class ShapeFileTest extends TestCase {
/**
* Returns URI path to a resource.
* @param name Resource name.
* @return URI path.
* @throws URISyntaxException if the resource name is incorrect.
*/
private static String path(final String name) throws URISyntaxException {
return new
File(ShapeFileTest.class.getResource(name).toURI()).getPath();
}
/**
* Test polylines count.
* @throws URISyntaxException if the resource name is incorrect.
* @throws DataStoreException if a general file reading trouble occurs.
*/
@Test
public void testPolyineCount() throws URISyntaxException,
DataStoreException {
ShapeFile shp = new ShapeFile(path("SignedBikeRoute_4326_clipped.shp"));
readAll(shp);
}
...
}
I would like all of my tests their logs coming from org.apache.sis.* packages
at FINER level.
Because I need to debug a part of the DBase driver and check all the fine and
finer log levels it is issuing.
I don’t understand how to do it.
Or, else, is there a way to avoid the Apache SIS logging system, and make
loggings return to classical
java.util.logging
that is working with logging.properties ?
Regards,
Marc Le Bihan