Python logging
Basic logging to stdout
import sys
import logging
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.error("He's dead, Jim")
As a rule I prefer using the Python logging library for any console output, just because it seems the most consistent. But I rarely can remember how to setup very basic logging to stdout, now I can refer to this post instead of going through old code.