pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
6.04k stars 307 forks source link

How to log properly in a hatch hook #1224

Closed benoit74 closed 9 months ago

benoit74 commented 9 months ago

In our hatch hooks (we have one metadata and one build hook) at https://github.com/openzim/hatch-openzim/, I would like to be able to log stuff so that it is displayed when invoking stuff like hatch --verbose build.

This would be very practical especially for the build hook (which does way more stuff than the metadata one) and in especially in case of error (to know what has already been done and where the hook failed).

Is there any solution already in place or planned?

ofek commented 9 months ago

If you use the latest version of Hatch (and Hatchling as the build backend) then any output should be shown. Is that not the case?

benoit74 commented 9 months ago

It does, never mind.