Skip to content

Commit 330b414

Browse files
committed
fix tf2onnx logging problem
1 parent a64c160 commit 330b414

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tf2onnx/verbose_logging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def basicConfig(**kwargs): # pylint: disable=invalid-name, function-redefined
4242
if "format" not in kwargs:
4343
level = kwargs.get("level", _logging.root.level)
4444
kwargs["format"] = _BASIC_LOG_FORMAT if level >= INFO else _VERBOSE_LOG_FORMAT
45-
45+
# config will make effect only when root.handlers is empty, so add the following statement to make sure it
46+
_logging.root.handlers = []
4647
_logging.basicConfig(**kwargs)
4748
set_tf_verbosity(_logging.getLogger().getEffectiveLevel())
4849

0 commit comments

Comments
 (0)