Skip to content

Commit

Permalink
chore: change logging structure (#128)
Browse files Browse the repository at this point in the history
* chore: change logging structure

* Update openeo_processes_dask/process_implementations/core.py

Co-authored-by: Stefaan Lippens <[email protected]>

* apply suggestion from review

---------

Co-authored-by: Stefaan Lippens <[email protected]>
  • Loading branch information
LukeWeidenwalker and soxofaan authored Jun 30, 2023
1 parent b8e701f commit 5f794bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion openeo_processes_dask/process_implementations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

logger = logging.getLogger(__name__)


from .arrays import *
from .comparison import *
from .cubes import *
Expand Down
9 changes: 5 additions & 4 deletions openeo_processes_dask/process_implementations/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ def wrapper(
if arg not in inspect.signature(f).parameters:
resolved_kwargs.pop(arg, None)

pretty_args = {k: type(v) for k, v in resolved_kwargs.items()}
logger.warning(f"Running process {f.__name__}")
logger.warning(f"kwargs: {pretty_args}")
logger.warning("-" * 80)
pretty_args = {k: repr(v)[:80] for k, v in resolved_kwargs.items()}
logger.info(f"Running process {f.__name__}")
logger.debug(
f"Running process {f.__name__} with resolved parameters: {pretty_args}"
)

return f(*resolved_args, **resolved_kwargs)

Expand Down

0 comments on commit 5f794bf

Please sign in to comment.