You must first configure SLF4J to intercept all Restlet calls in the java.util.logging API and map them to calls in the SLF4J facade API. You just do this by putting jul-to-slf4j.jar in your classpath, as @Bruno noted.
Secondly, you must configure the SLF4J facade to redirect its API calls to the logging implementation to actually generate the log message. To use the Logback logging implementation, you put logback-classic.jar in your classpath.
Finally, you must configure the selected logging implementation. If you use Logback, you can configure the logging level of individual Loggers using XML .
We use SLF4J with Restlet, and we really like the way SLF4J combines all the different logging APIs into one. It is very cute.
Edit April 29th, 2019: Be sure to check out comments by @NaftuliKay and @stempler.
source share