This will just buffer everything, thread-locally, and not forward it to any stream. The idea is that multiple tasks will run in multiple threads and you want to catch all the logging/stdout of each to not clutter the output, and also you want to keep it separate for each.
wrap_log_streams(alternative_stream, also_sys_stdout=False, tf_log_verbosity=None)¶
- alternative_stream (StreamThreadLocal|StreamDummy) –
- also_sys_stdout (bool) – wrap sys.stdout as well
- tf_log_verbosity (int|str|None) – e.g. “WARNING”
context manager which yields (original info stream v1, alternative_stream)