Skip to content

Commit

Permalink
style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
angelala3252 committed Jun 18, 2023
1 parent db24c49 commit fac1efb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions openadapt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ def configure_logging(logger, log_level):
log_level_override = os.getenv("LOG_LEVEL")
log_level = log_level_override or log_level
logger.remove()
logger_format = ("<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | "
"<level>{level: <8}</level> | "
"<cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> "
"- <level>{message}</level>")
logger_format = (
"<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | "
"<level>{level: <8}</level> | "
"<cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> "
"- <level>{message}</level>"
)
logger.add(
StreamHandler(sys.stderr),
colorize=True,
colorize=True,
level=log_level,
enqueue=True,
format=logger_format
format=logger_format,
filter=config.filter_log_messages if config.IGNORE_WARNINGS else None,
)
logger.debug(f"{log_level=}")
Expand Down

0 comments on commit fac1efb

Please sign in to comment.