Note that there are some explanatory texts on larger screens.

plurals
  1. PORestlet: how to suppress server request log messages
    text
    copied!<p>I have created a simple REST server using Restlet 2.1.2 and it is working very well. Every POST or GET request causes Restlet to emit a log message of the form:</p> <pre><code>2013-05-02 19:44:39 127.0.0.1 - - 8081 POST /rest/dispatch - 200 - - 21 http://127.0.0.1:8081Restlet-Framework/2.1.2 - </code></pre> <p>There are a lot of requests and it is not important for the application to collect those messages. Questions:</p> <ul> <li>From what class is that message emitted? I have tried to grep through the Restlet source code to find it, but no luck.</li> <li>Those messages are being sent to stdout. How can I write them directly to a file?</li> <li>How can I configure it so that such messages are generated only if the response status is something other than 200 ?</li> </ul> <p>Thanks a lot for any information.</p> <p>PS: I found some links which seem relevant, although I haven't yet puzzled out exactly what needs to be done. I'll leave these here for future reference.</p> <ul> <li><a href="http://restlet.org/learn/tutorial/2.1/#part07" rel="nofollow">http://restlet.org/learn/tutorial/2.1/#part07</a></li> <li><a href="http://restlet.org/learn/guide/2.1/editions/jse/logging" rel="nofollow">http://restlet.org/learn/guide/2.1/editions/jse/logging</a></li> <li><a href="http://restlet.org/learn/guide/2.0/core/service/log" rel="nofollow">http://restlet.org/learn/guide/2.0/core/service/log</a></li> <li><a href="http://restlet.org/learn/javadocs/snapshot/jse/engine/org/restlet/engine/log/LogFilter.html" rel="nofollow">http://restlet.org/learn/javadocs/snapshot/jse/engine/org/restlet/engine/log/LogFilter.html</a></li> <li><a href="http://restlet-discuss.1400322.n2.nabble.com/Hiding-Restlet-LogFilter-afterHandler-log-td7578429.html" rel="nofollow">http://restlet-discuss.1400322.n2.nabble.com/Hiding-Restlet-LogFilter-afterHandler-log-td7578429.html</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload