REST Logby Camptocamp https://github.com/OCA/rest-framework , ACSONE https://github.com/OCA/rest-framework , Odoo Community Association (OCA) https://github.com/OCA/rest-framework
|Lines of code||2365|
|Also available in version||v 14.0 v 13.0|
When exposing REST services is often useful to see what’s happening especially in case of errors.
This module add DB logging for REST requests. It also inject in the response the URL of the log entry created.
NOTE: this feature was implemented initially inside shopfloor app. Up to version 188.8.131.52.1 of this module, if shopfloor is installed, log records will be copied from its table.
Table of contents
Logs are kept in database for every REST requests made by a client application. They can be used for debugging and monitoring of the activity.
The Logs menu is shown only with Developer tools (?debug=1) activated.
By default, REST logs are kept 30 days. You can change the duration of the retention by changing the System Parameter rest.log.retention.days.
If the value is set to 0, the logs are not stored at all.
Logged data is: request URL and method, parameters, headers, result or error.
You have 2 ways to activate logging:
- on the service component set _log_calls_in_db = True
- via configuration
In the 1st case, calls will be always be logged.
In the 2nd case you can set rest.log.active param as:
`collection_name` # enable for all endpoints of the collection `collection_name.usage` # enable for specific endpoints `collection_name.usage.endpoint` # enable for specific endpoints `collection_name*:state` # enable only for specific state (success, failed)
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- Camptocamp R&D
- ACSONE R&D
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the OCA/rest-framework project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Please log in to comment on this module
- The author can leave a single reply to each comment.
- This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
- If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.