In alchemlyb, we use :mod:`loguru` for logging. By default, the :mod:`loguru` will print the logging information into the sys.stderr.
If you want to customise the printing to the stderr, you could remove the existing sink first
from loguru import logger logger.remove()
Then add other custom sink
logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")
The loguru logger is compatible with the :mod:`logging` module of the Python standard library and can easily be configured to log to a logging handler.
Alternatively, one could save to a file simply with
from loguru import logger logger.add("file_{time}.log")
See configure to log to a file for more explanation.