diff --git a/config.py b/config.py index 296316cf..1918d822 100644 --- a/config.py +++ b/config.py @@ -38,14 +38,14 @@ class DevelopmentConfig(Config): os.environ.get('POSTGRES_PASSWORD'), os.environ.get('POSTGRES_DB_NAME') ) - if not os.path.isfile('logs/opaque_web.log'): - file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log') + if not os.path.isfile('logs/nopaque.log'): + file_path = os.path.join(os.getcwd(), 'logs/nopaque.log') log = open(file_path, 'w+') log.close() if os.environ.get('FLASK_CONFIG') == 'development': log_format = ("%(asctime)s - %(levelname)s - %(name)s - " "%(filename)s - %(lineno)d - %(message)s") - logging.basicConfig(filename='logs/opaque_web.log', level='WARNING', + logging.basicConfig(filename='logs/nopaque.log', level='WARNING', format=log_format, datefmt='%Y-%m-%d %H:%M:%S', filemode='w') logger = logging.getLogger(__name__) @@ -71,14 +71,14 @@ class ProductionConfig(Config): os.environ.get('POSTGRES_PASSWORD'), os.environ.get('POSTGRES_DB_NAME') ) - if not os.path.isfile('logs/opaque_web.log'): - file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log') + if not os.path.isfile('logs/nopaque.log'): + file_path = os.path.join(os.getcwd(), 'logs/nopaque.log') log = open(file_path, 'w+') log.close() if os.environ.get('FLASK_CONFIG') == 'production': log_format = ("%(asctime)s - %(levelname)s - %(name)s - " "%(filename)s - %(lineno)d - %(message)s") - logging.basicConfig(filename='logs/opaque_web.log', level='ERROR', + logging.basicConfig(filename='logs/nopaque.log', level='ERROR', format=log_format, datefmt='%Y-%m-%d %H:%M:%S', filemode='w') logger = logging.getLogger(__name__)