def log_to_socket(level=logging.INFO, host='localhost',
                  port=DEFAULT_TCP_LOGGING_PORT):
    """Log all Lantz events to a socket with a specific host address and port.

    :param level: logging level for the lantz handler
    :param host: socket host (default 'localhost')
    :param port: socket port (default DEFAULT_TCP_LOGGING_PORT as defined in the
                 logging module)
    :return: lantz logger
    """
    handler = SocketHandler(host, port)
    handler.setLevel(level)
    LOGGER.addHandler(handler)
    if LOGGER.getEffectiveLevel() > level:
        LOGGER.setLevel(level)
    return LOGGER
dataset/ETHPy150Open LabPy/lantz/lantz/log.py/log_to_socket/original