fastapi-sqlalchemy-asyncpg icon indicating copy to clipboard operation
fastapi-sqlalchemy-asyncpg copied to clipboard

what's the relationship between "log_config" in uvicorn.run('main:app', host="127.0.0.1", port=8051, log_config="log.ini") and logging.getLogger(__name__)?

Open sanwei111 opened this issue 8 months ago • 0 comments

hello,sir. i wtite a log.ini,pass it for the para of log_config in uvicorn.run('main:app', host="127.0.0.1", port=8051, log_config="log.ini").

besides, i initializes class of logger by:self._logger = logging.getLogger(name) in some file.

i found that the log generated by self._logger can be found in the log file defined by "log_config".

so,question is:

  1. why?
  2. how can i output some dynamic log to the log file formally?

sanwei111 avatar Jun 13 '24 08:06 sanwei111