Overwriting sys.stdout
and sys.stderr
seems like a Bad Idea™.
Browsing the icecream source code, it looks like you can do this:
logger = logging.getLogger()
ic.configureOutput(outputFunction=logger.debug)
And then just make sure the logger is configured to actually print at DEBUG level.