How do I use django settings in my logging.ini file?
- by slypete
I have a BASE_DIR setting in my settings.py file:
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
I need to use this variable in my logging.ini file to setup my file handler paths.
The initialization of logging happens in the same file, the settings.py file, below my BASE_DIR variable:
LOG_INIT_DONE=False
if not LOG_INIT_DONE:
logging.config.fileConfig(LOGGING_INI)
LOG_INIT_DONE=True
Thanks,
Pete