Logging ======= By default, the :mod:`imfusion` module will write all log messages generated by the ImFusionLib C++ backend to stdout. If you require more control over the logging, you can transfer logging control to Python's `logging `_ module with :func:`~imfusion.log.transfer_to_python`:: >>> imfusion.log.error("test") # doctest: +SKIP test >>> imfusion.log.transfer_to_python() >>> imfusion.log.error("test") # won't write anything because logging is not initialized >>> import logging >>> logging.basicConfig() # or some other configuration >>> imfusion.log.error("test") # doctest: +SKIP ERROR:ImFusion:test After calling :func:`~imfusion.log.transfer_to_python`, all messages will be written to the ``"ImFusion"`` logger, see the last line of the above example.