Silencing JWeb1TSearcher: Setting the Java logging level per class

Working with the JWeb1TSearcher, I received tons of warning messages that some specific token could not be found:

As I did not care about this warning, I wanted to turn it off. Looking at the dependencies of the enclosing artifact com.googlecode.jweb1t, I learned that JWeb1T library uses the Apache Commons Logging library. Therefore, in order to disable the logging (programmatically) for the JWeb1TSearcher class we can use the following code snippet:

Only log messages of level ERROR or above will be logged now.


  • [1] Dependencies of com.googlecode.jweb1t:com.googlecode.jweb1t
  • [2] Apache Commons Logging guide

Leave a Reply