How do I use django settings in my logging.ini file?
Posted
by slypete
on Stack Overflow
See other posts from Stack Overflow
or by slypete
Published on 2010-06-03T00:49:29Z
Indexed on
2010/06/03
0:54 UTC
Read the original article
Hit count: 286
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
© Stack Overflow or respective owner