/r/python said to use the logging module, so I did.