Skip to content

Commit

Permalink
make httpx less noisy in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tykling committed Mar 1, 2024
1 parent 96eb54a commit f0d9aa3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dns_exporter/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def main(mockargs: list[str] | None = None) -> None:
# also configure the root logger
rootlogger = logging.getLogger("")
rootlogger.setLevel(level)
# httpx is noisy at INFO
if logger.isEnabledFor(logging.INFO):
logging.getLogger('httpx').setLevel(logging.WARNING)
logger.info(
f"dns_exporter v{DNSExporter.__version__} starting up - logging at level {level}",
)
Expand Down

0 comments on commit f0d9aa3

Please sign in to comment.