代码
# Get logger.
logger = get_logger()
# Print flags.
logger.info(stringify_flags(options))
def stringify_flags(options):
# Ignore negative boolean flags.
flags = {k: v for k, v in options.__dict__.items()}
return json.dumps(flags, indent=4, sort_keys=True)
效果
待补充