NLeSC / noodles

Computational workflow engine, making distributed computing in Python easy!
http://nlesc.github.io/noodles
Apache License 2.0
21 stars 7 forks source link

ENH: Replace `print` calls with `Logger.log` #86

Open BvB93 opened 2 years ago

BvB93 commented 2 years ago

Closes https://github.com/NLeSC/noodles/issues/85

This PR replaces the various print calls throughout the library with equivalent(-ish) logging.log calls, the latter having the advantage of greater user-control of the printed output and the which stream(s) are used therefor.

A best effort has been made to pick appropriate logging levels based on contact clues, .e.g a message previously being prefixed with "WARNING: " or, in the case of CRITICAL, a message mentioning an internal error and the user should contact the developers. Furthermore, logging messages based on a type of caught exception now also include the exceptions traceback, as these are in my experience extremely usefull when debugging exceptions.