Skip to content

Commit

Permalink
[UPD] README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed May 16, 2022
1 parent f9e294c commit 763da85
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 32 deletions.
30 changes: 22 additions & 8 deletions rest_log/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ REST Log
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Expand All @@ -32,12 +32,8 @@ 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.
If shopfloor is installed, log records will be copied from its table.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_
Up to version 13.0.1.2.1 of this module,
if shopfloor is installed, log records will be copied from its table.

**Table of contents**

Expand All @@ -63,6 +59,24 @@ 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.


Logs activation
~~~~~~~~~~~~~~~

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)

Changelog
=========

Expand Down
60 changes: 36 additions & 24 deletions rest_log/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,36 +367,32 @@ <h1 class="title">REST Log</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/rest-framework/tree/15.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" href="https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-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" href="https://runbot.odoo-community.org/runbot/271/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" 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" href="https://github.com/OCA/rest-framework/tree/15.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" href="https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-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" href="https://runbot.odoo-community.org/runbot/271/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>When exposing REST services is often useful to see what’s happening
especially in case of errors.</p>
<p>This module add DB logging for REST requests.
It also inject in the response the URL of the log entry created.</p>
<p>NOTE: this feature was implemented initially inside shopfloor app.
If shopfloor is installed, log records will be copied from its table.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
<a class="reference external" href="https://odoo-community.org/page/development-status">More details on development status</a></p>
</div>
Up to version 13.0.1.2.1 of this module,
if shopfloor is installed, log records will be copied from its table.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id2">Configuration</a><ul>
<li><a class="reference internal" href="#logs-retention" id="id3">Logs retention</a></li>
<li><a class="reference internal" href="#logs-activation" id="id4">Logs activation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#changelog" id="id4">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id5">13.0.1.0.0</a></li>
<li><a class="reference internal" href="#changelog" id="id5">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id6">13.0.1.0.0</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="id6">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id7">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id8">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id9">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id10">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id7">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id8">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id9">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id10">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id11">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id12">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -414,40 +410,56 @@ <h2><a class="toc-backref" href="#id3">Logs retention</a></h2>
<p>If the value is set to 0, the logs are not stored at all.</p>
<p>Logged data is: request URL and method, parameters, headers, result or error.</p>
</div>
<div class="section" id="logs-activation">
<h2><a class="toc-backref" href="#id4">Logs activation</a></h2>
<p>You have 2 ways to activate logging:</p>
<ul class="simple">
<li>on the service component set <cite>_log_calls_in_db = True</cite></li>
<li>via configuration</li>
</ul>
<p>In the 1st case, calls will be always be logged.</p>
<p>In the 2nd case you can set <tt class="docutils literal">rest.log.active</tt> param as:</p>
<pre class="literal-block">
`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)
</pre>
</div>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#id4">Changelog</a></h1>
<h1><a class="toc-backref" href="#id5">Changelog</a></h1>
<div class="section" id="id1">
<h2><a class="toc-backref" href="#id5">13.0.1.0.0</a></h2>
<h2><a class="toc-backref" href="#id6">13.0.1.0.0</a></h2>
<p>First official version.</p>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id6">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id7">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/rest-framework/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/rest-framework/issues/new?body=module:%20rest_log%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id7">Credits</a></h1>
<h1><a class="toc-backref" href="#id8">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id8">Authors</a></h2>
<h2><a class="toc-backref" href="#id9">Authors</a></h2>
<ul class="simple">
<li>Camptocamp</li>
<li>ACSONE</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id9">Contributors</a></h2>
<h2><a class="toc-backref" href="#id10">Contributors</a></h2>
<ul class="simple">
<li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li>
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simahawk&#64;gmail.com">simahawk&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id10">Other credits</a></h2>
<h2><a class="toc-backref" href="#id11">Other credits</a></h2>
<p><strong>Financial support</strong></p>
<ul class="simple">
<li>Cosanum</li>
Expand All @@ -456,7 +468,7 @@ <h2><a class="toc-backref" href="#id10">Other credits</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id11">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id12">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
Expand Down

0 comments on commit 763da85

Please sign in to comment.