<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_to(logger):
 """ Wraps a function that has a connection passed such that everything that happens on the connection is logged using the given logger. :type logger: Logger :param logger: The logger that handles the logging. """

    logger_id = id(logger)

    def decorator(function):
        func = add_label(function, 'log_to', logger_id=logger_id)
        return func
    return decorator