Skip to content

Commit

Permalink
fix logger (PaddlePaddle#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilong12 committed Apr 10, 2020
1 parent de115bf commit 415329e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plsc/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@
from .utils.parameter_converter import ParameterConverter
from .utils.verification import evaluate

logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
datefmt='%d %b %Y %H:%M:%S')
log_handler = logging.StreamHandler()
log_format = logging.Formatter(
'%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s')
log_handler.setFormatter(log_format)
logger = logging.getLogger(__name__)
logger.addHandler(log_handler)
logger.setLevel(logging.INFO)
logger.propagate = False


class Entry(object):
Expand Down

0 comments on commit 415329e

Please sign in to comment.