Hide foreground INFO alembic.runtime.migration stdout logging

The main purpose was to send message such as:
- Context impl SQLiteImpl
- Will assume non-transactional DDL

To the ARA logfile and hide them from stdout, same thing for the
SQL migrations.
This particular patch gets us something sort of in the middle,
it hides the two messages above from stdout but does not send them
to the logfile.

The SQL migrations are also printed to stdout, not sent to the
log file.
We need to revisit this later and do a better job at logging in
general.

Change-Id: I22d28e590228b61e525fe154c2138918dcf64e3b
This commit is contained in:
David Moreau-Simard
2017-03-31 16:18:59 -04:00
parent 38c923664a
commit 96cc8aa43d

View File

@@ -136,3 +136,9 @@ def configure_logging(app):
logger.setLevel(app.config['ARA_LOG_LEVEL'])
del logger.handlers[:]
logger.addHandler(handler)
# TODO: Log things from Alembic to ARA_LOG_FILE properly
alembic_logger = logging.getLogger('alembic')
alembic_logger.setLevel(logging.WARNING)
del alembic_logger.handlers[:]
alembic_logger.addHandler(handler)