code styling & improved logging

This commit is contained in:
Oscar Krause
2024-06-13 20:16:51 +02:00
parent eff6aae25d
commit 21f19be8ab
2 changed files with 16 additions and 4 deletions

View File

@@ -60,9 +60,11 @@ app.add_middleware(
allow_headers=['*'],
)
LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG if DEBUG else logging.INFO)
logger.setLevel(LOG_LEVEL)
logging.getLogger('util').setLevel(LOG_LEVEL)
def __get_token(request: Request) -> dict: