nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
234 stars 125 forks source link

Logger debug level could be better inherited by reproin.py #686

Open QihangYao opened 1 year ago

QihangYao commented 1 year ago

Summary

I run heudiconv with reproin heuristic and with --dbg flag on, but I didn't see debugging information in the log. It turns out that the debug level set in the main.py under heudiconv is not propagated to the reproin.py.

However, I believe the intuition of the author of reproin.py is that we inherit the logger from heudiconv by logging.getLogger('heudiconv')

My fix: I change the line in reproin.py from logging.getLogger('heudiconv') to logging.getLogger('heudiconv.main') and I got the debug log into STDERR.

Platform details:

Choose one: