Reputation: 2553
I have some code that is using the Restlet framework. It is writing an ERROR into my log4j log file:
2012-05-30 12:16:42,169 3278917 ERROR [STDERR] (Thread-97:) 30-May-2012 12:16:42 org.restlet.engine.http.connector.HttpClientHelper start
INFO: Starting the default HTTP client
Is there any way I can turn this logging off? I see there is a Client.getLogger()
, but I can't see a way to use that to turn logging off.
Upvotes: 2
Views: 1738
Reputation: 2892
You can rely on regular Java logging configuration (java.util.logging). Restlet Framework provides a simple way to adjust those properties, programmatically. Call for example:
org.restlet.engine.Engine.setLogLevel(Level.OFF);
Upvotes: 3
Reputation: 2202
Hi it maybe a little late but for me the following code did it:
ClientResource resource = new ClientResource();
resource.getLogger().setLevel(Level.WARNING); //<-- important
I left out the resource configuration and exectution because they are not important;-)
Upvotes: 0