suppress excessive messages from unused loggers (#920)

Only print the "logging to [dir]" message when the logger has something to output. Running with the new spawn change and both mpi and subprocvecenv, there are many "logging to [dir]" messages but most are not logging anything.
This commit is contained in:
Andy Twigg
2019-05-31 14:26:45 -07:00
committed by pzhokhov
parent 21776e8f57
commit f7d5a265e1

View File

@@ -394,7 +394,8 @@ def configure(dir=None, format_strs=None, comm=None, log_suffix=''):
output_formats = [make_output_format(f, dir, log_suffix) for f in format_strs]
Logger.CURRENT = Logger(dir=dir, output_formats=output_formats, comm=comm)
log('Logging to %s'%dir)
if output_formats:
log('Logging to %s'%dir)
def _configure_default_logger():
configure()