浏览代码

Adding a logging utility for improved logs

/bug-failed-api-check
Anupam Bhatnagar 5 年前
当前提交
8f4999d4
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17
      ml-agents/mlagents/logging_util.py

17
ml-agents/mlagents/logging_util.py


import logging
def create_logger(name):
log_level = logging.INFO
log_format = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s"
logging.basicConfig(level=log_level, format=log_format, datefmt="%Y-%m-%d %H:%M:%S")
logger = logging.getLogger(name=name)
return logger
# TODO
"""
1. change mlagents.trainers to mlagents_trainers
2. logger should be in lowercase in all files
3. if logger is not used in a file then it should be deleted
"""
正在加载...
取消
保存