Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
FMD-232 add logging to download requests (#88)
Browse files Browse the repository at this point in the history
* add logging to download requests

* move query params into separate dictionary

this should make it easier to query later on

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
gidsg and pre-commit-ci[bot] authored Feb 27, 2024
1 parent 37da77f commit 2b09666
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/main/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ def download():

content_type, file_content = process_api_response(query_params)

current_app.logger.info(
{
"request_type": "download",
"user_id": g.account_id,
"query_params": query_params,
}
)
return send_file(
file_content,
download_name=f"download-{current_datetime}.{file_format}",
Expand Down

0 comments on commit 2b09666

Please sign in to comment.