Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit 1d2bc3b

Browse files
authored
Reduce levels for some of the diagnostic log statements (#126)
1 parent 6d2a968 commit 1d2bc3b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/functions/message_status/function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def main(req: func.HttpRequest) -> func.HttpResponse:
1717
logging.info("MessageStatus HTTP trigger function. Processing callback from NHS Notify service.")
1818
req_body: str = req.get_body().decode("utf-8")
1919

20-
logging.info(req_body)
20+
logging.debug(req_body)
2121

2222
if request_verifier.verify_headers(req.headers) is False:
2323
status_code = 401

src/functions/notify/notifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def send_message(token, routing_plan_id, message_data, batch_id) -> str:
4747
batch_message_data = message_data.copy()
4848

4949
if response.status_code == 201:
50-
logging.info(response.text)
50+
logging.debug(response.text)
5151
batch_message_data["message_id"] = response.json()["data"]["id"]
5252
status = batch_message_recorder.SENT
5353
else:

src/functions/process_pilot_data/data_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def process_data(filename, raw_data) -> str:
3636
response = requests.post(notify_function_url(), json=post_body(data), headers=HEADERS)
3737

3838
if response:
39-
logging.info(response.text)
39+
logging.debug(response.text)
4040
else:
4141
logging.error(response.text)
4242

src/functions/process_pilot_data/function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ def process_data(csvblob: func.InputStream) -> str:
2020
raw_data = csvblob.read().decode("utf-8").splitlines()
2121
filename = os.path.splitext(os.path.basename(csvblob.name))[0]
2222
result = data_processor.process_data(filename, raw_data)
23-
logging.info(f"Data processor result: {result}")
23+
logging.debug(f"Data processor result: {result}")

src/shared/datastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def connection():
8282
sslmode=os.getenv("DATABASE_SSLMODE", "require"),
8383
)
8484
end = time.time()
85-
logging.info(f"Connected to database in {(end - start)}s")
85+
logging.debug(f"Connected to database in {(end - start)}s")
8686

8787
check_and_initialise_schema(conn)
8888

tests/unit/message_status/test_function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def create_http_request(payload):
4444

4545
def test_main_logs_payload(mocker, payload):
4646
"""Test that the request body is logged when the main function is called."""
47-
mock_log = mocker.patch("logging.info")
47+
mock_log = mocker.patch("logging.debug")
4848
request = create_http_request(payload)
4949

5050
func_call = function_app.main.build().get_user_function()

0 commit comments

Comments
 (0)