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

Suppress debug output #16

Closed
lydonjj opened this issue Nov 5, 2020 · 1 comment
Closed

Suppress debug output #16

lydonjj opened this issue Nov 5, 2020 · 1 comment
Assignees

Comments

@lydonjj
Copy link

lydonjj commented Nov 5, 2020

Running the code automatically outputs a debug post to the command line, how can I suppress it?

Example: 2020-11-04 21:01:25.993 | DEBUG | eia.api.base:_post:63 - made POST to https://api.eia.gov/series/ with parameters {'api_key': 'SECRET_APIKEY', 'out': 'json'} and payload
{'series_id': 'ELEC.SALES.AK-IND.M'}

Looks like it is in the _get_data method when you use Post?

Thank you!

@lydonjj lydonjj changed the title Suppress debug post output Suppress debug output Nov 5, 2020
@thomastu
Copy link
Owner

thomastu commented Nov 5, 2020

Thanks, previously generated logging messages were being configured implicitly via loguru. I've just pushed up a small fix (0.1.4) that addresses this (pip install --upgrade pyeia) should fix this. The library now (in line with the python logging cookbook) requires any downstream applications to enable library-level logging explicitly to see library logs.

@thomastu thomastu closed this as completed Nov 5, 2020
@thomastu thomastu self-assigned this Nov 5, 2020
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

No branches or pull requests

2 participants