Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quiet switch. Convert most output to logging #52

Merged
merged 3 commits into from
Oct 27, 2017

Conversation

reedstrm
Copy link
Contributor

As is, dbmigrator is a bit chatty. Move most output to logger.info, and add a quiet switch. I will take advantage of this in cnx-db/script/ci_test_migrations.sh to make non-CI invocation almost completely silent, so migration failures stand out.

@reedstrm
Copy link
Contributor Author

reedstrm commented Oct 23, 2017

Hmm, I broke all the tests. Code works, though :/

reedstrm added a commit to openstax/cnx-db that referenced this pull request Oct 23, 2017
@karenc
Copy link
Owner

karenc commented Oct 23, 2017

😆 No problems. I'll fix them later. It's something I thought about doing.

@reedstrm
Copy link
Contributor Author

I was going to recommend to Sisi that she be sure to run script/ci_test_migrations.sh, but then I realized it's massively unreadable output - great for CI, bad for human.

@reedstrm
Copy link
Contributor Author

BTW, here's the commit I use this in: openstax/cnx-db@38d06ac

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 96.911% when pulling d204d04 on Connexions:quiet-and-log into 63e6329 on karenc:master.

Instead of using print to output debug or warning messages, use the
dbmigrator logger instead.  That way, it is possible to customize the
output by using `setLevel` etc.
@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Coverage increased (+0.5%) to 97.633% when pulling c14b0bf on Connexions:quiet-and-log into 63e6329 on karenc:master.

@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Coverage decreased (-0.03%) to 97.115% when pulling 46ce7a8 on Connexions:quiet-and-log into 63e6329 on karenc:master.

karenc and others added 2 commits October 27, 2017 06:20
There were no tests covering cases for when migrations are not found or
if there are no migrations to rollback.
As is, dbmigrator is a bit chatty. I will take advantage of this in
cnx-db/script/ci_test_migrations.sh to make non-CI invocation almost
completely silent, so migration failures stand out.
@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Coverage increased (+0.5%) to 97.633% when pulling 576a6be on Connexions:quiet-and-log into 63e6329 on karenc:master.

@coveralls
Copy link

coveralls commented Oct 27, 2017

Coverage Status

Coverage increased (+0.5%) to 97.633% when pulling 576a6be on Connexions:quiet-and-log into 63e6329 on karenc:master.

@karenc karenc merged commit 1becb2b into karenc:master Oct 27, 2017
@karenc karenc deleted the quiet-and-log branch October 27, 2017 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants