def init_log(args): log.set_log_level(args.log) color_dict = { 'true': True, 'false': False } log.set_color(color_dict[args.color])
def init_log(args): log_dict = { 'debug': Log.DEBUG, 'info': Log.INFO, 'warn': Log.WARN, 'error': Log.ERROR, 'none': Log.NONE } log.set_log_level(log_dict[args.log]) color_dict = {'true': True, 'false': False} log.set_color(color_dict[args.color])