python logging to a file not console code example
Example: python logging to console exqmple
import sys
# ...
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
import sys
# ...
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))