Skip to content

Commit 33b8aab

Browse files
authored
Merge pull request #11 from Moesif/feature-log-body-option
Add: LogBody configuration option to remove request and response body
2 parents 7155b57 + 5080ff8 commit 33b8aab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

moesifpythonrequest/outgoing_recorder/outgoing_recorder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def prepare_model(self, mock_req, mock_res, event_model, start_time, end_time):
3232
# Create an instance of the class
3333
utility_function = UtilityFunction()
3434

35-
if mock_req.body:
35+
if global_variables.moesif_options.get('LOG_BODY_OUTGOING', True) and mock_req.body:
3636
try:
3737
if global_variables.DEBUG:
3838
print('about to parse request json')
@@ -47,7 +47,7 @@ def prepare_model(self, mock_req, mock_res, event_model, start_time, end_time):
4747
req_body = None
4848
req_body_transfer_encoding = None
4949

50-
if mock_res.content:
50+
if global_variables.moesif_options.get('LOG_BODY_OUTGOING', True) and mock_res.content:
5151
try:
5252
if global_variables.DEBUG:
5353
print("about to process response body as json")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Versions should comply with PEP440. For a discussion on single-sourcing
2929
# the version across setup.py and the project code, see
3030
# https://packaging.python.org/en/latest/single_source_version.html
31-
version='0.1.9',
31+
version='0.1.10',
3232

3333
description='Moesif Python request',
3434
long_description=long_description,

0 commit comments

Comments
 (0)