SOS icon indicating copy to clipboard operation
SOS copied to clipboard

Don't throw exceptions for invalid requests

Open srstsavage opened this issue 9 years ago • 3 comments

This may not be feasible, but seems worth a discussion.

Currently we throw OwsExceptions when invalid requests are made to the SOS. These often constitute the majority of the SOS log, and make it difficult to differentiate between a misbehaving client and real errors in the SOS (especially because ease OwsException comes with a long stack trace).

Could we log invalid requests in a separate log file, preferably without the stack trace? Or at least remove the stack trace in the main log for invalid requests? It would probably require that we catch the OwsException at some point, log it, and construct a non-exception error response...

srstsavage avatar Jul 08 '15 18:07 srstsavage

The used logging framework logback provides some filter functionality. Maybe with this it is possible to write the invalid request log statements into a separate log file. Invalid XML request contain the string [XmlBeans validation error:] which can be used for filtering.

CarstenHollmann avatar Jul 09 '15 07:07 CarstenHollmann

+1 for splitting up the log files. I would also include the requests that are invalid because of their content (non-existing parameter constellation etc.).

nuest avatar Aug 05 '15 08:08 nuest

:+1:

We need to reduce the noise in the logs. Everything regarding bad requests and other OwsException should be printed as one-line log giving the wrong parameter and it's value WITHOUT the exception stack trace.

EHJ-52n avatar Sep 26 '16 08:09 EHJ-52n