Skip to main content


Utility modules for making running workers and pods easier.

Modules in this package must never be imported into the core Bitfount package. Anything defined here is intended for the end user either directly or indirectly e.g. via scripts, tutorials, etc.





def setup_loggers(    loggers: List[logging.Logger], log_file_dir_name: Optional[str] = None,)> List[logging.Logger]:

Set up loggers with console and file handlers.

Creates a logfile in 'logs' directory with the current date and time and outputs all logs at the "DEBUG" level. Also outputs logs to stdout at the "INFO" level. A common scenario is to attach handlers only to the root logger, and to let propagation take care of the rest.


  • loggers: The logger(s) to set up
  • log_file_dir_name: Creates a subdirectory inside BITFOUNT_LOGS_DIR if provided. Defaults to None.

Returns A list of updated logger(s).