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.