more prominent warnings

pull/83/head
Aevann 2022-12-24 18:48:23 +02:00
parent 38247317fd
commit cd2c375ebd
1 changed files with 3 additions and 5 deletions

View File

@ -14,14 +14,12 @@ def worker_abort(worker):
try:
from flask import g, request
if g and request:
worker.log.warning("-------------------------------------------------")
worker.log.warning(f"While serving {request.method} {request.url}")
worker.log.warning(f"\n\nWhile serving {request.method} {request.url}")
u = getattr(g, 'v', None)
if u:
worker.log.warning(f"User: {u.username!r} id:{u.id}")
worker.log.warning(f"User: {u.username!r} id:{u.id}\n\n")
else:
worker.log.warning(f"User: not logged in")
worker.log.warning("-------------------------------------------------")
worker.log.warning(f"User: not logged in\n\n")
else:
worker.log.warning("No request info")
except: