Skip to content

Commit

Permalink
Changes made to application/__init__.py based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
li-ruihao committed Jan 8, 2025
1 parent 4b46a72 commit f86f53d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions application/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@
logging.config.dictConfig(config)
except Exception:
# Fallback to a basic configuration
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s')
logging.basicConfig(format='%(asctime)s %(levelname)s [%(name)s:%(lineno)d] %(message)s', level=logging.INFO, force=True)
logger.exception("Logging setup failed")
else:
# Initialize the logger after dictConfig succeeds
# As well, to ensure that logging configuration succeeded regardless
# of a successful dictConfig execution, log a warning message
# to see whether the configuration was actually successful
logger.warning("Logging is set up with config=%s", config)
logger.warning("Logging setup is completed with config=%s", config)

from .Profile.Profile import Profile

Expand Down

0 comments on commit f86f53d

Please sign in to comment.