Skip to content

Commit

Permalink
[FIX] monitoring_log_requests: response_status_code
Browse files Browse the repository at this point in the history
the response status code would not be properly logged -> fix the code
  • Loading branch information
gurneyalex committed Aug 27, 2024
1 parent bd561bc commit 30b7335
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exclude: |
^base_fileurl_field/|
^cloud_platform_exoscale/|
^cloud_platform_ovh/|
^monitoring_log_requests/|
^monitoring_statsd/|
^test_base_fileurl_field/|
# END NOT INSTALLABLE ADDONS
Expand Down
4 changes: 2 additions & 2 deletions monitoring_log_requests/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def _monitoring_info(cls, request, response, begin, end):
# response things
"response_status_code": None,
}
if hasattr(request, "status_code"):
info["status_code"] = response.status_code
if hasattr(response, "status_code"):
info["response_status_code"] = response.status_code
if hasattr(request, "session"):
info.update(
{
Expand Down
6 changes: 6 additions & 0 deletions setup/monitoring_log_requests/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 30b7335

Please sign in to comment.