fixes
This commit is contained in:
11
server.py
11
server.py
@@ -2,12 +2,6 @@ import sys
|
||||
import uvicorn
|
||||
from settings import PORT
|
||||
|
||||
|
||||
def exception_handler(exception_type, exception, traceback, debug_hook=sys.excepthook):
|
||||
print(vars(traceback))
|
||||
print("%s: %s" % (exception_type.__name__, exception))
|
||||
|
||||
|
||||
log_settings = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": True,
|
||||
@@ -53,6 +47,11 @@ local_headers = [
|
||||
]
|
||||
|
||||
|
||||
def exception_handler(exception_type, exception, traceback, debug_hook=sys.excepthook):
|
||||
traceback.print_exc()
|
||||
print("%s: %s" % (exception_type.__name__, exception))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.excepthook = exception_handler
|
||||
uvicorn.run(
|
||||
|
Reference in New Issue
Block a user