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

Implement logging #14

Open
Michael-E-Rose opened this issue Feb 22, 2019 · 1 comment
Open

Implement logging #14

Michael-E-Rose opened this issue Feb 22, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Michael-E-Rose
Copy link
Collaborator

In one way or the other, we need to implement logging.

At the very least, it should log which query is beging performed. Another interesting aspect might be to log timings.

@Michael-E-Rose Michael-E-Rose added the enhancement New feature or request label Feb 22, 2019
@Michael-E-Rose
Copy link
Collaborator Author

It would look like so:

import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

if verbose:
    logging.getLogger().setLevel(logging.INFO)
else:
    logging.getLogger().setLevel(logging.WARNING)

and then instead of print(), we would always use logging.info().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant