My settings.py
contains a lot of imports in try
/catch
blocks like:
try:
import gcframe
except ImportError:
# log gcframe is not available
pass
etc.
I'd like to use Django logger to log which modules are missing, but Django docs says:
Logging is configured immediately after settings have been loaded. Since the loading of settings is one of the first things that Django does, you can be certain that loggers are always ready for use in your project code.
Is there a way to create messages (log records) in settings.py
and trigger the logging of these messages after settings have been loaded?