def make_log_metric(level=logging.INFO, msg="<STR_LIT>"):
def log_metric(name, count, elapsed):<EOL><INDENT>log_name = '<STR_LIT>'.format(name) if name else '<STR_LIT>'<EOL>logging.getLogger(log_name).log(level, msg, count, elapsed)<EOL><DEDENT>return log_metric<EOL>
Make a new metric function that logs at the given level

    :arg int level: logging level, defaults to ``logging.INFO``
    :arg string msg: logging message format string, taking ``count`` and ``elapsed``
    :rtype: function