diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index c2ca1e1..6326fbb 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -163,9 +163,7 @@ class AuthAPI: return ret except Exception as e: t3 = time.time() - info(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') - print(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') - print_exc() + exception(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') raise e if user is None: diff --git a/ahserver/globalEnv.py b/ahserver/globalEnv.py index 66abaaa..7e81afb 100755 --- a/ahserver/globalEnv.py +++ b/ahserver/globalEnv.py @@ -25,6 +25,7 @@ from appPublic.uniqueID import setNode,getID from appPublic.unicoding import unicoding,uDict,uObject from appPublic.Singleton import SingletonDecorator from appPublic.rc4 import password +from appPublic.registerfunction import RegisterFunction from sqlor.dbpools import DBPools,runSQL,runSQLPaging from sqlor.filter import DBFilter, default_filterjson @@ -206,6 +207,7 @@ def initEnv(): g.save_file = save_file g.realpath = realpath g.format_exc = format_exc + g.rfexe = RegisterFunction().exe def set_builtins(): all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]