Move to using logging module
It would make it easier for folks using this package in pipelines if all of its output was provided in a log file. The Python logging module does exactly this. For example, one change which would be helpful would be to move from using warnings.warn and use logging.warn.
Should this be considered a backwards incompatible change?
This could be very helpful! I'm already using the python logging module for my wider codebase that uses ccsdspy, would your implementation of logging somehow allow specifying the log to output to? That way I could see ccsdspy warnings/errors in my existing log along with my other stuff as currently they are just printed to the stdout
We also use the logging module. My understand that it is possible to use multiple loggers together or configure loggers how you want to use them.
Is there an implementation choice in using the global logger versus passing a logger object to each function? Or maybe create an global API setter ccsdspy.set_logger(logger)? It's been a while since I used the logging module
Given my understanding of logging, you just set up your local logger and don't need to do anything special. It should be from ccsdspy import log. Users can then merge logs with their own loggers or do something different. I think we can easily add logging the way we do it and we can get feedback on whether that is the right approach.