Skip to content

Commit

Permalink
Avoid sending logs downstream to applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastu committed Nov 5, 2020
1 parent 4aca016 commit 11e687f
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 250 deletions.
7 changes: 6 additions & 1 deletion eia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from importlib import metadata
from loguru import logger

__version__ = metadata.version("eia")
__version__ = metadata.version("eia")

# Do not pass logs to application; it is always possible to enable logging
# at the application level, e.g. logger.enable("eia")
logger.disable(__name__)
2 changes: 1 addition & 1 deletion eia/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import itertools

from loguru import logger
from typing import Iterator, List
from typing import Iterator
from urllib.parse import urljoin

from eia import settings
Expand Down
Loading

0 comments on commit 11e687f

Please sign in to comment.