mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 16:48:36 +00:00
* Add environment var to enable/disable requests log * Add ability to send data to an UDP listener instead of stdout
11 lines
282 B
Python
11 lines
282 B
Python
# 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()))
|