chore
This commit is contained in:
parent
631704d04d
commit
714b8834c7
@ -15,18 +15,24 @@ logger.addHandler(fh)
|
|||||||
|
|
||||||
|
|
||||||
def quick_log(request: Request, body: Any, response: str):
|
def quick_log(request: Request, body: Any, response: str):
|
||||||
logger.info(
|
try:
|
||||||
f"Client: {request.client if request else ''}\nUrl: {request.url if request else ''}\n"
|
logger.info(
|
||||||
+ (
|
f"Client: {request.client if request else ''}\nUrl: {request.url if request else ''}\n"
|
||||||
f"Body: {json.dumps(body.__dict__, default=vars, ensure_ascii=False)}\n"
|
+ (
|
||||||
if body
|
f"Body: {json.dumps(body.__dict__, default=vars, ensure_ascii=False)}\n"
|
||||||
else ""
|
if body
|
||||||
|
else ""
|
||||||
|
)
|
||||||
|
+ (f"Data:\n{response}\n" if response else "")
|
||||||
)
|
)
|
||||||
+ (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):
|
async def log_middleware(request: Request):
|
||||||
logger.info(
|
try:
|
||||||
f"Client: {request.client}\nUrl: {request.url}\nBody: {await request.body()}\n"
|
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}")
|
||||||
|
@ -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.'), {
|
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',
|
type: 'info',
|
||||||
position: 'bottom-left',
|
position: 'bottom-left',
|
||||||
autoClose: 30000
|
autoClose: false
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
UpdateApp(updateUrl).then(() => {
|
UpdateApp(updateUrl).then(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user