code: def _get_log_config(log_file: str) -> dict:
      """Returns a logger configuration in the format expected by uvicorn that sends all logs to the given logfile."""
      # Modified from the default config found in uvicorn.config.LOGGING_CONFIG
      return {
          "version": 1,
          "disable_existing_loggers": False,
          "formatters": {
              "default": {
                  "()": "uvicorn.logging.DefaultFormatter",
                  "fmt": "%(levelprefix)s %(message)s",
                  "use_colors": False,
              },
          },
          "handlers": {
              "default": {
                  "formatter": "default",
                  "class": "logging.FileHandler",
                  "filename": log_file,
              },
          },
          "loggers": {
              "uvicorn": {
                  "handlers": ["default"],
                  "level": "INFO",
                  "propagate": False,
              },
              "uvicorn.error": {
                  "handlers": ["default"],
                  "level": "INFO",
                  "propagate": False,
              },
              "uvicorn.access": {
                  "handlers": ["default"],
                  "level": "INFO",
                  "propagate": False,
              },
          },
      }
  
file_path: pytorch-lightning/src/lightning/app/frontend/web.py
imports: import multiprocessing
  from argparse import ArgumentParser
  from typing import Optional
  from urllib.parse import urljoin
  import uvicorn
  from fastapi import FastAPI
  from fastapi.middleware.cors import CORSMiddleware
  from starlette.staticfiles import StaticFiles
  from lightning.app.frontend.frontend import Frontend
  from lightning.app.utilities.log import get_logfile
  from lightning.app.utilities.network import find_free_network_port
label_desc: Use image node_id 3 for calling a global function with example usage: _get_log_config(log_file) and returns: dict