Skip to content

Commit

Permalink
Add logging basis
Browse files Browse the repository at this point in the history
  • Loading branch information
tmi committed Dec 9, 2024
1 parent 3508f77 commit 0c26e72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions findlibs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import configparser
import ctypes.util
import importlib
import logging
import os
import sys
import warnings
Expand All @@ -21,6 +22,8 @@

__version__ = "0.0.5"

logger = logging.getLogger(__name__)

EXTENSIONS = defaultdict(
lambda: ".so",
darwin=".dylib",
Expand Down Expand Up @@ -256,6 +259,8 @@ def find(lib_name: str, pkg_name: str | None = None) -> str | None:
)

for source in sources_filtered:
logger.debug(f"about to search for {lib_name}/{pkg_name} in {source}")
if result := source(lib_name, pkg_name):
logger.debug(f"found {lib_name}/{pkg_name} in {source}")
return result
return None

0 comments on commit 0c26e72

Please sign in to comment.