Skip to content

Commit

Permalink
log override method return values at different verbosity levels
Browse files Browse the repository at this point in the history
Log return values from default functions at debug
and real overrides at info.
  • Loading branch information
dhellmann committed Nov 7, 2024
1 parent 2ae5f89 commit a3fa2a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fromager/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ def find_and_invoke(
fn = default_fn

result = invoke(fn, **kwargs)
logger.info(f"{distname}: override method {fn.__name__} returned {result}")
if fn is default_fn:
log_method = logger.debug
else:
log_method = logger.info
log_method(f"{distname}: override method {fn.__name__} returned {result}")

return result


Expand Down

0 comments on commit a3fa2a5

Please sign in to comment.