Ensure all required directories are created before we start logging.
parent
d7d4bf475b
commit
be42b67f79
|
|
@ -160,6 +160,10 @@ def create_app(app_name=None):
|
|||
logger = logging.getLogger('werkzeug')
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
# Ensure the various working directories exist
|
||||
from pgadmin.setup import create_app_data_directory, db_upgrade
|
||||
create_app_data_directory(config)
|
||||
|
||||
# File logging
|
||||
fh = logging.FileHandler(config.LOG_FILE, encoding='utf-8')
|
||||
fh.setLevel(config.FILE_LOG_LEVEL)
|
||||
|
|
@ -180,11 +184,6 @@ def create_app(app_name=None):
|
|||
app.logger.info('########################################################')
|
||||
app.logger.debug("Python syspath: %s", sys.path)
|
||||
|
||||
from pgadmin.setup import create_app_data_directory, db_upgrade
|
||||
|
||||
# Sanity checks (App data directory exists)
|
||||
create_app_data_directory(config)
|
||||
|
||||
##########################################################################
|
||||
# Setup i18n
|
||||
##########################################################################
|
||||
|
|
|
|||
Loading…
Reference in New Issue