Added secrets file, updated environemnt variable for logging path
This commit is contained in:
parent
4563f04d84
commit
b3d865b93c
@ -15,7 +15,7 @@ def init_logger(app: Flask, log_level=INFO) -> Flask:
|
||||
logger = getLogger(app.name)
|
||||
formatter = Formatter(f'[%(asctime)s] {app.name.upper()} %(levelname)s: %(message)s (%(filename)s.%(funcName)s)')
|
||||
logger.setLevel(log_level)
|
||||
to_file = FileHandler(os.environ.get('APP_LOG_PATH', f'./{app.name}.log'))
|
||||
to_file = FileHandler(os.environ.get('MRE_LOG_PATH', f'./{app.name}.log'))
|
||||
to_file.setFormatter(formatter)
|
||||
logger.addHandler(to_file)
|
||||
|
||||
@ -28,6 +28,4 @@ def create_app(app_name: str='MRE') -> Flask:
|
||||
app = load_config_from_environ(app)
|
||||
app = init_logger(app)
|
||||
|
||||
app.logger.info(app.name)
|
||||
|
||||
return app
|
||||
|
||||
6
app/secrets
Normal file
6
app/secrets
Normal file
@ -0,0 +1,6 @@
|
||||
# Secrets which are encrypted using git-crypt before being sent to git-crypt
|
||||
FLASK_SECRET_KEY=""
|
||||
POSTGRES_USER=""
|
||||
POSTGRES_PASSWD=""
|
||||
REDIS_USER=""
|
||||
REDIS_PASSWD=""
|
||||
Loading…
Reference in New Issue
Block a user