I want to use pprint's output to show a complex data structure, but I would like to output it using the logging module rather than stdout. ds = [{'hello': 'there'}] logging.debug( pprint.pprint(ds) ) # outputs as STDOUT Continue reading...