<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_connection_logging(self, loadbalancer, val):
 """ Sets the connection logging for the given load balancer. """

        uri = "/loadbalancers/%s/connectionlogging" % utils.get_id(loadbalancer)
        val = str(val).lower()
        req_body = {"connectionLogging": {
                "enabled": val,
                }}
        resp, body = self.api.method_put(uri, body=req_body)
        return body