Here is a program that causes doubled Tensorflow logging messages:
import tensorflow as tf
import logging
logging.basicConfig(level=logging.INFO)
tf.logging.info("tf version %s" % tf.__version__)
Output:
INFO:tensorflow:tf version 1.4.0
INFO:tensorflow:tf version 1.4.0
This stackoverflow answer says to 1) to turn off logger propagation on the custom logger; 2) it will be fixed soon (in Nov 2015, over two years ago).
I wanted to turn off log message propagation on the Tensorflow logger, and found this post that suggested the following as a hack just for a REPL (i.e. interactively):
tf.logging._logger.propagate = False
Works like a charm.
But .. is there a better way?