Logging

Python has a built-in and widely-used logging module in the standard library.

Some parts of tdg have it integrated, following the recommended convention of initializing the module’s logger with

import logging
logger = logging.getLogger(__name__)

More logging will be added with time, especially as bugs are hunted.

Executables that use the default tdg.cli.ArgumentParser can parse some --log flags which allow you to format or set the log level. We have inserted a CITE level just above the WARNING, which is used to acknowledge other works which you should cite if you use that piece of tdg.