mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
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:
@ -856,7 +856,10 @@ def main():
|
|||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
logging_util.configure_logger(logger)
|
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):
|
if os.path.isfile(comp_args.comp_dir):
|
||||||
logger.error("{} is not a directory".format(comp_args.comp_dir))
|
logger.error("{} is not a directory".format(comp_args.comp_dir))
|
||||||
|
Reference in New Issue
Block a user