File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,23 +90,23 @@ def get_logging_config() -> dict[str, Any]:
9090 timestamp = datetime .now (UTC ).strftime ("%d-%b_%I-%M%p_UTC" )
9191 log_file = log_dir / f"web_{ timestamp } .log"
9292
93- config ["handlers" ]["file" ] = {
93+ config ["handlers" ]["file" ] = { # type: ignore
9494 "class" : "logging.handlers.RotatingFileHandler" ,
9595 "level" : log_level ,
9696 "filename" : str (log_file ),
9797 "maxBytes" : 10485760 , # 10MB
9898 "backupCount" : 5 ,
9999 "formatter" : "file" ,
100100 }
101- config ["root" ]["handlers" ].append ("file" )
102- config ["loggers" ]["uvicorn.access" ]["handlers" ].append ("file" )
101+ config ["root" ]["handlers" ].append ("file" ) # type: ignore[index]
102+ config ["loggers" ]["uvicorn.access" ]["handlers" ].append ("file" ) # type: ignore[index]
103103 if settings .LOG_FORMAT_AS_JSON :
104- config ["handlers" ]["file" ]["formatter" ] = "json"
104+ config ["handlers" ]["file" ]["formatter" ] = "json" # type: ignore[index]
105105 else :
106- config ["handlers" ]["file" ]["formatter" ] = "plain_text"
106+ config ["handlers" ]["file" ]["formatter" ] = "plain_text" # type: ignore[index]
107107
108108 if settings .LOG_FORMAT_AS_JSON :
109- config ["handlers" ]["console" ]["formatter" ] = "json"
109+ config ["handlers" ]["console" ]["formatter" ] = "json" # type: ignore[index]
110110
111111 return config
112112
You can’t perform that action at this time.
0 commit comments