Skip to content

Commit

Permalink
Verbose log fix (#63)
Browse files Browse the repository at this point in the history
* Bug Fix:

- When switching from verbose=True to verbose=False, the logging level is properly set back to warning.  This will stop extra logs from printing
  • Loading branch information
coreyjs authored Aug 16, 2024
1 parent bd3ef53 commit 237fa85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nhlpy/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Should this be driven by the main pyproject.toml file? yes, is it super convoluted? yes, can it wait? sure

__version__ = "2.9.0"
__version__ = "2.9.1"
2 changes: 2 additions & 0 deletions nhlpy/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ def __init__(self, config) -> None:
self._config = config
if self._config.verbose:
logging.basicConfig(level=logging.INFO)
else:
logging.basicConfig(level=logging.WARNING)

def get(self, resource: str) -> httpx.request:
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "nhl-api-py"
version = "2.9.0"
version = "2.9.1"
description = "NHL API (Updated for 2024/2025) and EDGE Stats. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods as well as pythonic query builder for more indepth EDGE stats."
authors = ["Corey Schaf <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 237fa85

Please sign in to comment.