Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
development:python [2023/09/28 17:17] Zyzonixdevelopment:python [2024/02/27 07:32] (current) Zyzonix
Line 157: Line 157:
 ++++ ++++
 </panel> </panel>
 +
 +==== FastAPI/Uvicorn ====
 +=== Change Log Format ===
 +Adding the following lines to your ''uvicorn'' initialization function will change the output of the webserver:
 +<code bash>
 +log_config = uvicorn.config.LOGGING_CONFIG
 +log_config["formatters"]["access"]["fmt"] = "%(asctime)s - %(levelname)s - %(message)s"
 +uvicorn.run(app, port=80, host=SERVERIP, log_config=log_config)
 +</code>
 +
 +//Sourced from [[https://github.com/tiangolo/fastapi/issues/1508|github.com - tiangolo/fastapi]]//
  • development/python.txt
  • Last modified: 2024/02/27 07:32
  • by Zyzonix