def configure(level, logfile=None):
log_format = "<STR_LIT>"<EOL>date_format = '<STR_LIT>'<EOL>logging.basicConfig(format=log_format, datefmt=date_format)<EOL>Log.setLevel(level)<EOL>if logfile is not None:<EOL><INDENT>fh = logging.FileHandler(logfile)<EOL>fh.setFormatter(logging.Formatter(log_format))<EOL>Log.addHandler(fh)<EOL><DEDENT>
configure logging