diff --git a/python/paddle/distributed/utils/log_utils.py b/python/paddle/distributed/utils/log_utils.py index 01687fc28d18f4ab6614e6836739cb59998ba7f0..c00ce9b82786f500f4054e2eb215b4b7df151cde 100644 --- a/python/paddle/distributed/utils/log_utils.py +++ b/python/paddle/distributed/utils/log_utils.py @@ -18,7 +18,10 @@ import logging def get_logger(log_level, name="root"): logger = logging.getLogger(name) + # Avoid printing multiple logs + logger.propagate = False + if not logger.handlers: log_handler = logging.StreamHandler() logger.setLevel(log_level)