monitoring_log_requests: Improve data output

* Add environment var to enable/disable requests log
* Add ability to send data to an UDP listener instead of stdout
This commit is contained in:
Patrick Tombez
2020-09-03 10:48:59 +02:00
parent af8cee48fb
commit 41ce092562
5 changed files with 44 additions and 5 deletions
+10
View File
@@ -0,0 +1,10 @@
# Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from distutils.util import strtobool
from os import environ
def is_enabled():
env_val = environ.get('ODOO_REQUESTS_LOGGING')
return bool(strtobool(env_val or '0'.lower()))