How to redirect TensorFlow logging to a file? : <p>I'm using TensorFlow-Slim, which has some useful logging printed out to console by <code>tf.logging</code>. I would like to redirect those loggings to a text file, but couldn't find a way doing so. I looked at the <code>tf_logging.py</code> source code, which exposes the following, but doesn't seem to have the option to write logs to a file. Please let me know if I missed something.</p>

<pre><code>__all__ = ['log', 'debug', 'error', 'fatal', 'info', 'warn', 'warning',
           'DEBUG', 'ERROR', 'FATAL', 'INFO', 'WARN',
           'flush', 'log_every_n', 'log_first_n', 'vlog',
           'TaskLevelStatusMessage', 'get_verbosity', 'set_verbosity']
</code></pre>
