Skip to content

Commit

Permalink
fix logger pollution (#44857)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizhiqing authored Aug 4, 2022
1 parent a3f3172 commit c3a2cdc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/paddle/distributed/ps/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
import os
import logging

logging.basicConfig(
format='%(asctime)s %(levelname)-2s [%(filename)s:%(lineno)d] %(message)s',
level=logging.INFO)
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter(
fmt='%(asctime)s %(levelname)-2s [%(filename)s:%(lineno)d] %(message)s')
ch = logging.StreamHandler()
ch.setFormatter(formatter)
logger.addHandler(ch)


class ClientInfoAttr:
Expand Down

0 comments on commit c3a2cdc

Please sign in to comment.