Skip to content

Commit

Permalink
Logging fix (#194)
Browse files Browse the repository at this point in the history
Removed encoding from logging basicConfig calls to be compliant with python versions older than 3.9
  • Loading branch information
emizan76 authored Oct 14, 2021
1 parent 6d57529 commit be51f7d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mlperf_logging/compliance_checker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
parser = mlp_compliance.get_parser()
args = parser.parse_args()

logging.basicConfig(filename=args.log_output, encoding='utf-8', level=logging.INFO)
logging.basicConfig(filename=args.log_output, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
formatter = logging.Formatter("%(levelname)s - %(message)s")
logging.getLogger().handlers[0].setFormatter(formatter)
Expand Down
2 changes: 1 addition & 1 deletion mlperf_logging/package_checker/package_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def main():
parser = get_parser()
args = parser.parse_args()

logging.basicConfig(filename=args.log_output, encoding='utf-8', level=logging.INFO)
logging.basicConfig(filename=args.log_output, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
formatter = logging.Formatter("%(levelname)s - %(message)s")
logging.getLogger().handlers[0].setFormatter(formatter)
Expand Down
2 changes: 1 addition & 1 deletion mlperf_logging/rcp_checker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
parser = rcp_checker.get_parser()
args = parser.parse_args()

logging.basicConfig(filename=args.log_output, encoding='utf-8', level=logging.INFO)
logging.basicConfig(filename=args.log_output, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
formatter = logging.Formatter("%(levelname)s - %(message)s")
logging.getLogger().handlers[0].setFormatter(formatter)
Expand Down
2 changes: 1 addition & 1 deletion mlperf_logging/system_desc_checker/system_desc_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def main():
parser = get_parser()
args = parser.parse_args()

logging.basicConfig(filename=args.log_output, encoding='utf-8', level=logging.INFO)
logging.basicConfig(filename=args.log_output, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
formatter = logging.Formatter("%(levelname)s - %(message)s")
logging.getLogger().handlers[0].setFormatter(formatter)
Expand Down

0 comments on commit be51f7d

Please sign in to comment.