mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-19 05:33:47 +01:00
fix ugly printed error of uvicorn.error (#1833)
This commit is contained in:
parent
11fec7a889
commit
a81a2b5a08
@ -483,9 +483,11 @@ def configure_logger() -> None:
|
||||
logger.remove()
|
||||
log_level: str = "DEBUG" if settings.debug else "INFO"
|
||||
formatter = Formatter()
|
||||
logger.add(sys.stderr, level=log_level, format=formatter.format)
|
||||
logger.add(sys.stdout, level=log_level, format=formatter.format)
|
||||
logging.getLogger("uvicorn").handlers = [InterceptHandler()]
|
||||
logging.getLogger("uvicorn.access").handlers = [InterceptHandler()]
|
||||
logging.getLogger("uvicorn.error").handlers = [InterceptHandler()]
|
||||
logging.getLogger("uvicorn.error").propagate = False
|
||||
|
||||
|
||||
class Formatter:
|
||||
|
Loading…
Reference in New Issue
Block a user