Quantcast

Hiding Restlet LogFilter#afterHandler log

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hiding Restlet LogFilter#afterHandler log

William Ferguson
I've configured logging.properties to only show WARNING level logs for Restlet and while that generally seems to work, I always get log entry for every request for the LogFilter istelf. Eg

2012-10-21 15:10:47.638 org.restlet.engine.log.LogFilter afterHandle: 2012-10-21 05:10:47 101.165.32.41

Here is my logging.properties
.level=INFO
org.restlet.level=WARNING
org.restlet.engine.log.LogFilter.level=WARNING


Any ideas of why this is occuring and how to gte rid of it?

William

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3022299
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hiding Restlet LogFilter#afterHandler log

Thierry Boileau-3
Hello William,


Actually this is due to the java.util.logging.SimpleFormatter used by the JDK by default which not only logs the LogRecord generated by any call to Logger#fine, Logger#severe, etc, but also an additional line with the date, source method, etc.
You can set up the a logHandler and specify a simpler Formatter, for example the "org.restlet.engine.log.AccessLogFormatter".
You can have a look at the standard documentation or here.


Best regards,
Thierry Boileau


I've configured logging.properties to only show WARNING level logs for Restlet and while that generally seems to work, I always get log entry for every request for the LogFilter istelf. Eg

2012-10-21 15:10:47.638 org.restlet.engine.log.LogFilter afterHandle: 2012-10-21        05:10:47        101.165.32.41

Here is my logging.properties
.level=INFO
org.restlet.level=WARNING
org.restlet.engine.log.LogFilter.level=WARNING


Any ideas of why this is occuring and how to gte rid of it?

William

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3022299

Loading...