mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
add COLOR_LOG config
This commit is contained in:
parent
4caafc7e7b
commit
df3838480d
2 changed files with 4 additions and 1 deletions
|
@ -25,6 +25,7 @@ else:
|
|||
load_dotenv()
|
||||
|
||||
RESET_DB = "RESET_DB" in os.environ
|
||||
COLOR_LOG = "COLOR_LOG" in os.environ
|
||||
|
||||
# Allow user to have 1 year of premium: set the expiration_date to 1 year more
|
||||
PROMO_CODE = "SIMPLEISBETTER"
|
||||
|
|
|
@ -13,6 +13,7 @@ from app.config import (
|
|||
CLOUDWATCH_LOG_GROUP,
|
||||
ENABLE_CLOUDWATCH,
|
||||
CLOUDWATCH_LOG_STREAM,
|
||||
COLOR_LOG,
|
||||
)
|
||||
|
||||
_log_format = "%(asctime)s - %(name)s - %(levelname)s - %(process)d - %(module)s:%(lineno)d - %(funcName)s - %(message)s"
|
||||
|
@ -66,7 +67,8 @@ def _get_logger(name):
|
|||
# no propagation to avoid propagating to root logger
|
||||
logger.propagate = False
|
||||
|
||||
coloredlogs.install(level="DEBUG", logger=logger)
|
||||
if COLOR_LOG:
|
||||
coloredlogs.install(level="DEBUG", logger=logger)
|
||||
|
||||
return logger
|
||||
|
||||
|
|
Loading…
Reference in a new issue