mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 14:28:48 +00:00
set log format
This commit is contained in:
parent
c9ac915055
commit
35fc5ea6b0
@ -91,7 +91,7 @@ app.add_middleware(
|
|||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO
|
LOG_LEVEL = logging.DEBUG if DEBUG else logging.INFO
|
||||||
logging.basicConfig()
|
logging.basicConfig(format='[{levelname:^7}] [{module:^15}] {message}', style='{')
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.setLevel(LOG_LEVEL)
|
logger.setLevel(LOG_LEVEL)
|
||||||
logging.getLogger('util').setLevel(LOG_LEVEL)
|
logging.getLogger('util').setLevel(LOG_LEVEL)
|
||||||
|
Loading…
Reference in New Issue
Block a user