Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we improve the <lambda> in timed progress logging? #300

Closed
phargogh opened this issue Jan 28, 2023 · 0 comments · Fixed by #304
Closed

Can we improve the <lambda> in timed progress logging? #300

phargogh opened this issue Jan 28, 2023 · 0 comments · Fixed by #304
Assignees
Labels
bug Something isn't working

Comments

@phargogh
Copy link
Member

Whenever we have a bunch of long-running raster_calculator() calls, particularly when we're doing some multiprocessing, it's easy to end up with a whole pile of logging messages that look like this:

2023-01-27 16:51:49,702:pid6291:INFO:pygeoprocessing.geoprocessing:<lambda>:35.2% complete

Worse, even though many of these come from raster_calculator, the timed progress logging could really be coming from almost any one of the geoprocessing functions in the module. With python's ability to walk the call stack at runtime, we have to be able to programmatically and deliberately set the __name__ attribute to the calling function. So instead of seeing <lambda>, we should see raster_calculator or maybe even a user-defined string if it's appropriate.

@phargogh phargogh added the bug Something isn't working label Jan 28, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
@phargogh phargogh self-assigned this Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 9, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 14, 2023
phargogh added a commit to phargogh/pygeoprocessing that referenced this issue Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant