Add public method docstrings.

This commit is contained in:
Julian Stirling 2025-07-10 15:12:28 +01:00
parent 1bbbfeef0f
commit 14359e73bb
8 changed files with 58 additions and 8 deletions

View file

@ -21,6 +21,14 @@ OFM_LOG_FILE = None
def configure_logging(log_folder):
"""Configure logging for the server while it is running.
This modifies the root logger to have a rotating file handler and
adds a custom handler that prints and stores all records except
``uvicorn.access`` logs.
It is important not to let Uvicorn override these settings.
"""
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO)
# Explictly make OFM_LOG_FILE a global so it can be updated based on log settings