Logging level for errors in REST

I’m planning to change the way the REST module does error logging in the next release (which will be 2.12).

Please comment if you think there’s a better way to do this, from the perspective of someone who actually uses the logs to see what’s going on.

It used to be that every error wrote something to the log file at ERROR level. (This was particularly bothering me because, for example, I would get automated error emails every time someone typed in the patient search box on the home screen of our Mirebalais installation, after their session had timed out.)

I changed things so:

  • Any error in a REST request that is fundamentally caused by the user not being logged in => not logged at all
  • Otherwise…
  • Any 4xx error is logged at INFO level (because these are client errors)
  • Any 5xx error is logged at ERROR level (because these are server errors)

Comment here if you disagree, or else discuss at https://issues.openmrs.org/browse/RESTWS-497

(FYI @mogoodrich)

1 Like