code_size_compare: set log level as ERROR in option --stdout

If we use option --stdout, the logging level is set as
logging.ERROR. But --verbose is able to overwrite logging level as
logging.INFO if we want to display intermediate log in the process
of code size comparison.

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
Yanray Wang 2023-07-26 10:17:17 +08:00
parent 2ba9df2c1b
commit 533cde22c0

View File

@ -856,7 +856,10 @@ def main():
logger = logging.getLogger()
logging_util.configure_logger(logger)
logger.setLevel(logging.DEBUG if comp_args.verbose else logging.INFO)
if comp_args.stdout and not comp_args.verbose:
logger.setLevel(logging.ERROR)
else:
logger.setLevel(logging.DEBUG if comp_args.verbose else logging.INFO)
if os.path.isfile(comp_args.comp_dir):
logger.error("{} is not a directory".format(comp_args.comp_dir))