Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

add number of masked records into masking endpoint log message #692

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The types of changes are:
* Adds Fideslog integration [#541](https://github.com/ethyca/fidesops/pull/541)
* Adds endpoint analytics events [#622](https://github.com/ethyca/fidesops/pull/622)
* Sample dataset and access configuration for Zendesk (ticket endpoints) [#677](https://github.com/ethyca/fidesops/pull/677)
* Include number of records to be masked in masking endpoint's log message [#692](https://github.com/ethyca/fidesops/pull/692)

### Changed

Expand Down
4 changes: 3 additions & 1 deletion src/fidesops/api/v1/endpoints/masking_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def mask_value(request: MaskingAPIRequest) -> MaskingAPIResponse:
strategy = MaskingStrategyFactory.get_strategy(
masking_strategy.strategy, masking_strategy.configuration
)
logger.info(f"Starting masking with strategy {masking_strategy.strategy}")
logger.info(
f"Starting masking of {len(values)} value(s) with strategy {masking_strategy.strategy}"
)
masked_values = strategy.mask(values, None)
return MaskingAPIResponse(plain=values, masked_values=masked_values)
except NoSuchStrategyException as e:
Expand Down