<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(level, message):
 """ Publish `message` with the `level` the redis `channel`. :param level: the level of the message :param message: the message you want to log """

    if redis_instance is None:
        __connect()

    if level not in __error_levels:
        raise InvalidErrorLevel('You have used an invalid error level. \
                Please choose in: ' + ', '.join(__error_levels))
    if channel is None:
        raise NoChannelError('Please set a channel.')
    c = '{channel}.{level}'.format(channel=channel, level=level)
    redis_instance.publish(c, message)