Created on 2023-04-17 09:42 by schlatterbeck, last changed 2023-08-09 07:48 by schlatterbeck.
|msg7758||Author: [hidden] (schlatterbeck)||Date: 2023-04-17 09:42|
Currently the REST-API doesn't log anything when an error occurs. I'm currently dealing with a problem where the lag between retries and me receiving the problem report is on the order of weeks. From the apache log (roundup runs as WSGI under apache in that application) I see that they receive a 400 from apache. Now I'd really like to know what they sent. I propose to add logging to failed requests: Currently all errors are handled in the function _data_decorator in rest.py. So we could add a log there centrally and log the parameters of the request and the error message they receive. I'm unsure about the severity of the log. Since this is the normal operation (and errors are not errors in roundup) I'd suggest to log this as INFO or lower. Or should this be a DEBUG log? I would run this always-on in production as it is normal operation that I have to debug a client web service on my end :-) So I tend to make this INFO. What do you think?
|msg7761||Author: [hidden] (rouilj)||Date: 2023-04-17 22:58|
Info sounds reasonable.
|msg7817||Author: [hidden] (rouilj)||Date: 2023-07-25 20:40|
Ralf, do you have patches for this?
|msg7824||Author: [hidden] (rouilj)||Date: 2023-08-09 05:22|
Ralf: What do you think about a config.ini setting: rest_logging = [none|debug|info|...] so you can enable/disable rest logging and set the log level? As an aside, should we have more section in config.ini, e.g. [rest]? I would need to figure out how aliases work and move some items around if we were to add a new section.
|msg7825||Author: [hidden] (schlatterbeck)||Date: 2023-08-09 07:48|
Hi John, thanks for looking into this! On Wed, Aug 09, 2023 at 05:22:49AM +0000, John Rouillard wrote: > > Ralf: > > What do you think about a config.ini setting: > > > rest_logging = [none|debug|info|...] > > so you can enable/disable rest logging and set the log level? Good idea! This would cover my needs to run this continuously and I could make my log-level higher (to hide other things). Better than having a hard-coded log-level. > As an aside, should we have more section in config.ini, e.g. [rest]? Hmm, for now I wouldn't do this we currently don't have too many rest-specific items I think. Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: firstname.lastname@example.org
|2023-08-09 07:48:13||schlatterbeck||set||messages: + msg7825|
|2023-08-09 05:22:48||rouilj||set||messages: + msg7824|
|2023-07-25 20:40:07||rouilj||set||messages: + msg7817|
|2023-04-17 22:58:22||rouilj||set||messages: + msg7761|