33< head >
44< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
55< meta name ="generator " content ="Docutils: https://docutils.sourceforge.io/ " />
6- < title > README.rst </ title >
6+ < title > REST Log </ title >
77< style type ="text/css ">
88
99/*
360360</ style >
361361</ head >
362362< body >
363- < div class ="document ">
363+ < div class ="document " id ="rest-log ">
364+ < h1 class ="title "> REST Log</ h1 >
364365
365-
366- < a class ="reference external image-reference " href ="https://odoo-community.org/get-involved?utm_source=readme ">
367- < img alt ="Odoo Community Association " src ="https://odoo-community.org/readme-banner-image " />
368- </ a >
369- < div class ="section " id ="rest-log ">
370- < h1 > REST Log</ h1 >
371366<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367!! This file is generated by oca-gen-addon-readme !!
373368!! changes will be overwritten. !!
374369!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370!! source digest: sha256:1149568a02aa9975271ddee0f11ef624385750bef50e4b92f44ab55de7680496
376371!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377- < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/license-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/rest-framework/tree/18.0/rest_log "> < img alt ="OCA/rest-framework " src ="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-rest_log "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
372+ < p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/lgpl-3.0-standalone.html "> < img alt ="License: LGPL-3 " src ="https://img.shields.io/badge/licence-LGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/rest-framework/tree/18.0/rest_log "> < img alt ="OCA/rest-framework " src ="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-rest_log "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
378373< p > When exposing REST services is often useful to see what’s happening
379374especially in case of errors.</ p >
380375< p > This module add DB logging for REST requests. It also inject in the
381376response the URL of the log entry created.</ p >
377+ < p > It can also enable profiling for selected REST endpoints. When profiling
378+ is active, the request execution is wrapped by Odoo’s profiler and
379+ results are stored in < tt class ="docutils literal "> ir_profile</ tt > .</ p >
382380< p > NOTE: this feature was implemented initially inside shopfloor app. Up to
383381version 13.0.1.2.1 of this module, if shopfloor is installed, log
384382records will be copied from its table.</ p >
@@ -388,26 +386,27 @@ <h1>REST Log</h1>
388386< li > < a class ="reference internal " href ="#configuration " id ="toc-entry-1 "> Configuration</ a > < ul >
389387< li > < a class ="reference internal " href ="#logs-retention " id ="toc-entry-2 "> Logs retention</ a > </ li >
390388< li > < a class ="reference internal " href ="#logs-activation " id ="toc-entry-3 "> Logs activation</ a > </ li >
389+ < li > < a class ="reference internal " href ="#profiling " id ="toc-entry-4 "> Profiling</ a > </ li >
391390</ ul >
392391</ li >
393- < li > < a class ="reference internal " href ="#changelog " id ="toc-entry-4 "> Changelog</ a > < ul >
394- < li > < a class ="reference internal " href ="#section-1 " id ="toc-entry-5 "> 13.0.1.0.0</ a > </ li >
392+ < li > < a class ="reference internal " href ="#changelog " id ="toc-entry-5 "> Changelog</ a > < ul >
393+ < li > < a class ="reference internal " href ="#section-1 " id ="toc-entry-6 "> 13.0.1.0.0</ a > </ li >
395394</ ul >
396395</ li >
397- < li > < a class ="reference internal " href ="#bug-tracker " id ="toc-entry-6 "> Bug Tracker</ a > </ li >
398- < li > < a class ="reference internal " href ="#credits " id ="toc-entry-7 "> Credits</ a > < ul >
399- < li > < a class ="reference internal " href ="#authors " id ="toc-entry-8 "> Authors</ a > </ li >
400- < li > < a class ="reference internal " href ="#contributors " id ="toc-entry-9 "> Contributors</ a > </ li >
401- < li > < a class ="reference internal " href ="#other-credits " id ="toc-entry-10 "> Other credits</ a > </ li >
402- < li > < a class ="reference internal " href ="#maintainers " id ="toc-entry-11 "> Maintainers</ a > </ li >
396+ < li > < a class ="reference internal " href ="#bug-tracker " id ="toc-entry-7 "> Bug Tracker</ a > </ li >
397+ < li > < a class ="reference internal " href ="#credits " id ="toc-entry-8 "> Credits</ a > < ul >
398+ < li > < a class ="reference internal " href ="#authors " id ="toc-entry-9 "> Authors</ a > </ li >
399+ < li > < a class ="reference internal " href ="#contributors " id ="toc-entry-10 "> Contributors</ a > </ li >
400+ < li > < a class ="reference internal " href ="#other-credits " id ="toc-entry-11 "> Other credits</ a > </ li >
401+ < li > < a class ="reference internal " href ="#maintainers " id ="toc-entry-12 "> Maintainers</ a > </ li >
403402</ ul >
404403</ li >
405404</ ul >
406405</ div >
407406< div class ="section " id ="configuration ">
408- < h2 > < a class ="toc-backref " href ="#toc-entry-1 "> Configuration</ a > </ h2 >
407+ < h1 > < a class ="toc-backref " href ="#toc-entry-1 "> Configuration</ a > </ h1 >
409408< div class ="section " id ="logs-retention ">
410- < h3 > < a class ="toc-backref " href ="#toc-entry-2 "> Logs retention</ a > </ h3 >
409+ < h2 > < a class ="toc-backref " href ="#toc-entry-2 "> Logs retention</ a > </ h2 >
411410< p > Logs are kept in database for every REST requests made by a client
412411application. They can be used for debugging and monitoring of the
413412activity.</ p >
@@ -421,7 +420,7 @@ <h3><a class="toc-backref" href="#toc-entry-2">Logs retention</a></h3>
421420error.</ p >
422421</ div >
423422< div class ="section " id ="logs-activation ">
424- < h3 > < a class ="toc-backref " href ="#toc-entry-3 "> Logs activation</ a > </ h3 >
423+ < h2 > < a class ="toc-backref " href ="#toc-entry-3 "> Logs activation</ a > </ h2 >
425424< p > You have 2 ways to activate logging:</ p >
426425< ul class ="simple ">
427426< li > on the service component set _log_calls_in_db = True</ li >
@@ -436,40 +435,54 @@ <h3><a class="toc-backref" href="#toc-entry-3">Logs activation</a></h3>
436435`collection_name*:state` # enable only for specific state (success, failed)
437436</ pre >
438437</ div >
438+ < div class ="section " id ="profiling ">
439+ < h2 > < a class ="toc-backref " href ="#toc-entry-4 "> Profiling</ a > </ h2 >
440+ < p > Profiling is enabled per endpoint and per user via system parameters:</ p >
441+ < ul class ="simple ">
442+ < li > < tt class ="docutils literal "> rest.log.profiling.conf</ tt > : same matching syntax as
443+ < tt class ="docutils literal "> rest.log.active</ tt > </ li >
444+ < li > < tt class ="docutils literal "> rest.log.profiling.uid</ tt > : comma-separated list of user ids allowed
445+ to profile</ li >
446+ </ ul >
447+ < p > When both parameters match, the request execution is wrapped in Odoo’s
448+ profiler and the results are stored in < tt class ="docutils literal "> ir_profile</ tt > .</ p >
449+ < p > < tt class ="docutils literal "> base.profiling_enabled_until</ tt > is only needed to view speedscope
450+ output in the UI. It is not required to record profiles.</ p >
451+ </ div >
439452</ div >
440453< div class ="section " id ="changelog ">
441- < h2 > < a class ="toc-backref " href ="#toc-entry-4 "> Changelog</ a > </ h2 >
454+ < h1 > < a class ="toc-backref " href ="#toc-entry-5 "> Changelog</ a > </ h1 >
442455< div class ="section " id ="section-1 ">
443- < h3 > < a class ="toc-backref " href ="#toc-entry-5 "> 13.0.1.0.0</ a > </ h3 >
456+ < h2 > < a class ="toc-backref " href ="#toc-entry-6 "> 13.0.1.0.0</ a > </ h2 >
444457< p > First official version.</ p >
445458</ div >
446459</ div >
447460< div class ="section " id ="bug-tracker ">
448- < h2 > < a class ="toc-backref " href ="#toc-entry-6 "> Bug Tracker</ a > </ h2 >
461+ < h1 > < a class ="toc-backref " href ="#toc-entry-7 "> Bug Tracker</ a > </ h1 >
449462< p > Bugs are tracked on < a class ="reference external " href ="https://github.com/OCA/rest-framework/issues "> GitHub Issues</ a > .
450463In case of trouble, please check there if your issue has already been reported.
451464If you spotted it first, help us to smash it by providing a detailed and welcomed
452465< a class ="reference external " href ="https://github.com/OCA/rest-framework/issues/new?body=module:%20rest_log%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior** "> feedback</ a > .</ p >
453466< p > Do not contact contributors directly about support or help with technical issues.</ p >
454467</ div >
455468< div class ="section " id ="credits ">
456- < h2 > < a class ="toc-backref " href ="#toc-entry-7 "> Credits</ a > </ h2 >
469+ < h1 > < a class ="toc-backref " href ="#toc-entry-8 "> Credits</ a > </ h1 >
457470< div class ="section " id ="authors ">
458- < h3 > < a class ="toc-backref " href ="#toc-entry-8 "> Authors</ a > </ h3 >
471+ < h2 > < a class ="toc-backref " href ="#toc-entry-9 "> Authors</ a > </ h2 >
459472< ul class ="simple ">
460473< li > Camptocamp</ li >
461474< li > ACSONE</ li >
462475</ ul >
463476</ div >
464477< div class ="section " id ="contributors ">
465- < h3 > < a class ="toc-backref " href ="#toc-entry-9 "> Contributors</ a > </ h3 >
478+ < h2 > < a class ="toc-backref " href ="#toc-entry-10 "> Contributors</ a > </ h2 >
466479< ul class ="simple ">
467480< li > Guewen Baconnier << a class ="reference external " href ="mailto:guewen.baconnier@camptocamp.com "> guewen.baconnier@camptocamp.com</ a > ></ li >
468481< li > Simone Orsi << a class ="reference external " href ="mailto:simahawk@gmail.com "> simahawk@gmail.com</ a > ></ li >
469482</ ul >
470483</ div >
471484< div class ="section " id ="other-credits ">
472- < h3 > < a class ="toc-backref " href ="#toc-entry-10 "> Other credits</ a > </ h3 >
485+ < h2 > < a class ="toc-backref " href ="#toc-entry-11 "> Other credits</ a > </ h2 >
473486< p > < strong > Financial support</ strong > </ p >
474487< ul class ="simple ">
475488< li > Cosanum</ li >
@@ -478,7 +491,7 @@ <h3><a class="toc-backref" href="#toc-entry-10">Other credits</a></h3>
478491</ ul >
479492</ div >
480493< div class ="section " id ="maintainers ">
481- < h3 > < a class ="toc-backref " href ="#toc-entry-11 "> Maintainers</ a > </ h3 >
494+ < h2 > < a class ="toc-backref " href ="#toc-entry-12 "> Maintainers</ a > </ h2 >
482495< p > This module is maintained by the OCA.</ p >
483496< a class ="reference external image-reference " href ="https://odoo-community.org ">
484497< img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " />
@@ -493,6 +506,5 @@ <h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
493506</ div >
494507</ div >
495508</ div >
496- </ div >
497509</ body >
498510</ html >
0 commit comments