This commit is contained in:
josc146 2023-06-13 22:47:17 +08:00
parent 631704d04d
commit 714b8834c7
2 changed files with 18 additions and 12 deletions

View File

@ -15,6 +15,7 @@ logger.addHandler(fh)
def quick_log(request: Request, body: Any, response: str):
try:
logger.info(
f"Client: {request.client if request else ''}\nUrl: {request.url if request else ''}\n"
+ (
@ -24,9 +25,14 @@ def quick_log(request: Request, body: Any, response: str):
)
+ (f"Data:\n{response}\n" if response else "")
)
except Exception as e:
logger.info(f"Error quick_log request:\n{e}")
async def log_middleware(request: Request):
try:
logger.info(
f"Client: {request.client}\nUrl: {request.url}\nBody: {await request.body()}\n"
)
except Exception as e:
logger.info(f"Error log_middleware request:\n{e}")

View File

@ -250,7 +250,7 @@ export async function checkUpdate(notifyEvenLatest: boolean = false) {
toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), {
type: 'info',
position: 'bottom-left',
autoClose: 30000
autoClose: false
});
setTimeout(() => {
UpdateApp(updateUrl).then(() => {