Logging - hzovaro/spaxelsleuth GitHub Wiki

By default, information messages and warnings are printed to the terminal. To save the output to a file instead, simply do the following:

from spaxelsleuth import configure_logger
configure_logger(logfile_name="output.log")

The minimum level of messages logged can be controlled using the level parameter:

configure_logger(level="DEBUG")    # print ALL messages
configure_logger(level="INFO")     # print information and warning messages (default - recommended)
configure_logger(level="WARNING")  # print only warnings