@@ -862,7 +862,6 @@ def __init__(
862862 name_suffix : str = get_option ('external_function.name_suffix' ),
863863 function_database : Optional [str ] = None ,
864864 log_file : Optional [str ] = get_option ('external_function.log_file' ),
865-
866865 log_level : str = get_option ('external_function.log_level' ),
867866 disable_metrics : bool = get_option ('external_function.disable_metrics' ),
868867 app_name : Optional [str ] = get_option ('external_function.app_name' ),
@@ -1326,9 +1325,11 @@ def get_function_info(
13261325 ) -> Dict [str , Any ]:
13271326 """
13281327 Return the functions and function signature information.
1328+
13291329 Returns
13301330 -------
13311331 Dict[str, Any]
1332+
13321333 """
13331334 functions = {}
13341335 no_default = object ()
@@ -1849,7 +1850,6 @@ def main(argv: Optional[List[str]] = None) -> None:
18491850 ),
18501851 help = 'File path to write logs to instead of console' ,
18511852 )
1852-
18531853 parser .add_argument (
18541854 '--disable-metrics' , action = 'store_true' ,
18551855 default = defaults .get (
@@ -1999,11 +1999,11 @@ def main(argv: Optional[List[str]] = None) -> None:
19991999 raise RuntimeError ('no functions specified' )
20002000
20012001 for f in funcs :
2002- logger .info (f )
2002+ app . logger .info (f )
20032003
20042004 try :
20052005 if args .db :
2006- logger .info ('Registering functions with database' )
2006+ app . logger .info ('Registering functions with database' )
20072007 app .register_functions (
20082008 args .db ,
20092009 replace = args .replace_existing ,
@@ -2068,7 +2068,7 @@ def main(argv: Optional[List[str]] = None) -> None:
20682068
20692069 finally :
20702070 if not use_async and args .db :
2071- logger .info ('Dropping functions from database' )
2071+ app . logger .info ('Dropping functions from database' )
20722072 app .drop_functions (args .db )
20732073
20742074
@@ -2081,7 +2081,7 @@ async def _run_uvicorn(
20812081 """Run uvicorn server and clean up functions after shutdown."""
20822082 await uvicorn .Server (uvicorn .Config (app , ** app_args )).serve ()
20832083 if db :
2084- logger .info ('Dropping functions from database' )
2084+ app . logger .info ('Dropping functions from database' )
20852085 app .drop_functions (db )
20862086
20872087
0 commit comments