MCPcopy Create free account
hub / github.com/fastapi/fastapi / write_log

Function write_log

docs_src/background_tasks/tutorial002_py310.py:6–8  ·  view source on GitHub ↗
(message: str)

Source from the content-addressed store, hash-verified

4
5
6def write_log(message: str):
7 with open("log.txt", mode="a") as log:
8 log.write(message)
9
10
11def get_query(background_tasks: BackgroundTasks, q: str | None = None):

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected